+ Reply to Thread
Results 1 to 9 of 9

Defining the middle value of a horizontal scroll bar

  1. #1
    Registered User
    Join Date
    03-04-2015
    Location
    Washington State
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Defining the middle value of a horizontal scroll bar

    Hello,

    I am working with several horizontal scroll bars in excel, and I'd like to define the middle value of the scroll bar to be something other than just halfway between the minimum and the maximum. For example, I'd like a scroll bar with a minimum of 30, a maximum of 44, and a middle value of 36, instead of 37. Is there a way to do this?

    Thanks for your help!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Defining the middle value of a horizontal scroll bar

    No; how could that work?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-04-2015
    Location
    Washington State
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Re: Defining the middle value of a horizontal scroll bar

    I should probably clarify that I am creating these sliders for visual effect I am uninterested in numerical/statistical accuracy.

    So, this would work if the ranges on either side of your middle ("target") value are not equal. This may be because how far you stray from your target value is not equally important on either side of the target value.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Defining the middle value of a horizontal scroll bar

    It's more logical than mathematical.

    A scroll bar has integer steps; let's say your step size is 1. And simplify the problem so your min and max are 1 and 5, and you want the middle at 4 instead of 3.

    It takes four clicks to get from 1 to 5; which step would be 4? How many clicks from there to 5?

  5. #5
    Registered User
    Join Date
    03-04-2015
    Location
    Washington State
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Re: Defining the middle value of a horizontal scroll bar

    Ok, so I guess what I'm looking for is a way to customize the step size along my range?

    Does it really not make sense or am I just doing a horrible job describing what I'm trying to do? I accept that this may not be something excel can do, but I figured I should ask here first.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Defining the middle value of a horizontal scroll bar

    It's not a question of what Excel can do (yet), it's a question of you figuring out (and then explaining) what behavior you want.

    You can use formulas or code to transform the scroll bar value in any non-linear way you like.

  7. #7
    Registered User
    Join Date
    03-04-2015
    Location
    Washington State
    MS-Off Ver
    Professional Plus 2013
    Posts
    4

    Re: Defining the middle value of a horizontal scroll bar

    Yes, perhaps there is a way to write a code for the max and min to get what I want...

    OK. Draw a horizontal line on a piece of paper. Put the number 30 on the left end, and the number 44 on the right end. Then intersect the middle of the line with a smaller line. Put the number 36 above this line. 36 represents the middle of my horizontal line.

    Obviously 36 is not the logical median for a set of integers between 30 and 44. But that's not what I am looking for. I am looking for a sliding scroll bar between 30 and 44, with 36 at the middle.

    In order for this to work, the step size on either side of the middle will not be proportionate. I think if you leave the step size above 36 at 1, the step size below 36 will need to be 6/8. That way, there are a proportionate number of intervals on either side of my middle, but not equal lengths.

    So perhaps my real question is this: can excel create slider bars with disproportionate step size on either side of the median?

    Does that accurately describe what I'm trying to achieve? Thank you for helping with this question!
    Last edited by clubbr; 03-04-2015 at 09:44 PM.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Defining the middle value of a horizontal scroll bar

    A scroll bar has integer values. List a set of (ascending integer) scroll bar values in one column, and the desired results in a second. Use a lookup from one to the other.
    Last edited by shg; 03-05-2015 at 01:13 AM.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Defining the middle value of a horizontal scroll bar

    Maybe this is what you had in mind?

    Row\Col
    B
    C
    D
    E
    F
    2
    smin
    smax
    3
    30
    44
    B3: Input C3: Input
    4
    sa
    a
    5
    37
    36
    B5: Input C5: Input
    6
    h
    1.2224
    C6: =LOG((a-smin)/(smax-smin), (sa-smin)/(smax-smin))
    7
    8
    s
    y
    9
    30
    30.00
    C9: =((s-smin)/(smax-smin))^h * (smax - smin) + smin
    10
    31
    30.56
    11
    32
    31.30
    12
    33
    32.13
    13
    34
    33.03
    14
    35
    33.98
    15
    36
    34.97
    16
    37
    36.00
    17
    38
    37.06
    18
    39
    38.16
    19
    40
    39.28
    20
    41
    40.43
    21
    42
    41.60
    22
    43
    42.79
    23
    44
    44.00

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 10-26-2014, 04:43 PM
  2. Replies: 3
    Last Post: 02-28-2014, 03:55 PM
  3. [SOLVED] Utilizing the middle scroll on a mouse in VBA
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 08:58 AM
  4. horizontal scroll bar references
    By skihula in forum Excel General
    Replies: 2
    Last Post: 12-28-2005, 01:50 PM
  5. [SOLVED] No Horizontal Scroll Bar
    By Screen/Display size in forum Excel General
    Replies: 1
    Last Post: 08-19-2005, 10:05 AM

Tags for this Thread

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