+ Reply to Thread
Results 1 to 4 of 4

non independent inputs on scroll bars

  1. #1
    Registered User
    Join Date
    01-18-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    15

    non independent inputs on scroll bars

    Hello to you all,

    I am trying to do something in Excel but I don't know how to do it and so I need some help!

    Basically, I have two inputs on a calculation that I want to use a scroll bar. However, the problem is that they are not independant.

    I am doing something with a right angled triangle.

    The inputs are angle (self explanatory) and pitch (although for ease of interpretation I will call pitch "adjacent")

    I have a constant (which is the length opposite the angle of the triangle) - specified in a cell. This will never change.

    So, angle = atan (opposite/adjacent) and adjacent= opposite / tan(angle)

    But like I say, I want them both these inputs on scroll bars so that if you change say angle, it automatically changes adjacent and vice-a-versa. Is this possible?

    Some help would be greatly appreciated. Thanks.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: non independent inputs on scroll bars

    You want to define two variables. You want the user to be able to set either one, and have the other one calculated. In Excel you can't have it both ways. A cell has to be either a constant or a formula. Therefore this needs to be solved with VBA.

    Before I fully understood your question I noodled around with it, see attached for a start on this. I will take another look at a VBA solution for this.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: non independent inputs on scroll bars

    Here is the VBA solution, in Excel 2003 format.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-18-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: non independent inputs on scroll bars

    That is great, that is exactly what I needed!

    Just need to incorporate it into my code.

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1