Interactive elements in Excel with Spin Buttons and Scroll Bars

Helen Bradley explains how to add interactive elements to an Excel worksheet using scroll bars and spin buttons.

Whenever your user has a discrete number of choices to make for inputting data into an Excel worksheet you can save time by automating how they enter this data. You can do this in a number of ways and one of them is to use a spin button or a scroll bar to do the work. Today, I'll introduce you to using spin buttons and scroll bars and show you an way to add an interactive element to an Excel chart with a spin button.

Get your Developer tab

In Excel 2007 and Excel 2010, the spin buttons and scroll bars are accessible from the Developer tab. If you don't have this visible, in Excel 2010, choose File > Options > Customize Ribbon and in the second panel make sure that the Developer checkbox is selected. In Excel 2007 click the Office button, choose Excel Options and then enable the Show Developer tab in the Ribbon checkbox in the Popular group.

Spin Buttons and Scroll Bars are accessible from the Developer tab

To see the tools, choose Developer > Insert and then select either the Spin Button or the Scroll Bar tool from the Form Controls group. It's vital that you select those in the Form Controls group not the ActiveX Controls as they work very differently and it's the Form Controls that we are using.

Select either Spin Button or Scroll Bar from the Form Controls group

Drag a Spin Button onto your worksheet and drag a Scroll Bar onto your worksheet too. Notice that you can drag your scrollbars so they are oriented either vertically or horizontally. To move or resize a control, right click it to select it and then size or move as required.

Drag a Spin Button onto your worksheet and drag a Scroll Bar onto your worksheet

To see how these work, right click the Spin Button and choose Format Control. In the Control tab are your options for configuring the Spin Button. Essentially what the Spin Button does is to place a value in a cell for you. You click the arrows to increase or decrease the value in the cell.

The limits for the Spin Button are that the value is to be a whole number between 0 and 30,000 and the Incremental Change can be any whole number between 1 and 30,000.

For now, set the Current Value to 50, Minimum Value to 0, Maximum Value to 300 and the Incremental Change to 10. Click in the Cell Link box, click on cell A1 and close the dialog.

Click away from the Spin Button to deselect it and now click the arrows on the Spin Button. As you do, you'll see the value in cell A1 change. You can increase the value to 300 but not any higher and decrease it to 0 but not any lower. Notice that the value changes in steps of 10.

Make a Spin Button more useful

You can use a Spin Button like this to make it easy for a user to enter a value into a worksheet by clicking a button rather than typing a value. However, you might be wondering what you can do when the values they are to enter are not whole numbers between 0 and 30,000?

The answer is to use an intermediate cell to make the calculations for you. So, for example, if you want a user to enter a value between 0 percent and 5 percent in steps of 0.1% you'll need to scale the value the Spin Button gives you so you get a range of values from 0 to .05 in steps of .001.

There are any number of ways to do the mathematics for this and it doesn't really matter how you do it as long as your solution works. Here is one way to get your Spin Button to do this: right click it and set the Minimum Value to 0, the Maximum Value to 500 and the Incremental Change to 10. Again, set the cell link to cell A1. Now, in cell A2 type the formula =A1/10000, and format A2 using a percentage format and one decimal place.

Now as you click on the Spin Button you'll see that the value in cell A2 gives you what you want - a percentage value between 0 and 5% in increments of 0.1%. The value in cell A1 is being created by the Spin Button but it is the value in cell A2 that you are most interested in. Whenever you need to produce a value more complex than an integer between 0 and 30000 use a solution like this to scale the value you get from the Spin Button to get your desired value.

Spin Button - a percentage value between 0 and 5% in increments of 0.1%

How Scroll Bars work

A Scroll Bar works in a similar way to the Spin Button except that with a Scroll Bar you can set a Page Change value which is the change in value when you click on the Scroll Bar either side of its moving marker. The Incremental Change value is applied when you click on the arrows at either end of the Scroll Bar. With a Scroll Bar you must, of course, set a Cell Link for the value to be placed in. If you want to scale the value, you'll need to use a second cell with a formula in it that will scale the value that the Scroll Bar gives you appropriately for the end result that you need.

For example, consider an organization that makes loans of anything from $20,000 to $5,000,000 in multiples of $10,000. You can use a scrollbar for entering the loan amount. In the example I've set the cell link cell to E2 and the formula in C2 is =E2*10000 - this is the cell that shows the desired loan amount.

Using a scrollbar for entering the loan amount

The Scroll Bar's properties are: Minimum Value of 2, a Maximum Value of 500, Incremental Change of 1 and a Page Change of 10. The Incremental Change has to be set to 1 to allow the user to fine-tune the amount to any multiple of $10,000. This is essential because if you're going to build a solution that is usable the user has to be able to easily get to the result they want using it. If you were to set the Incremental Change to 5, for example the user would only be able to increment the actual loan amount in multiples of 50,000 which is too big - they have to be able to increment the loan in multiples of $10,000 (because that's what the organization lends), so the Incremental Change has to be set to 1 to accommodate this.

The Page Change value lets the user change the loan amount in steps of $100,000 which will help the user get closer to the loan amount that they want to use. The middle slider is not controlled by any setting so a user can get instantly from $20,000 to $5,000,000 by simply dragging the marker from one end of the scroll bar to the other.

Interactive chart with a Spin Button

Download the sample worksheet to follow along this example.

To see how this can all be put together, here is a worksheet with a series of sales values for dates from the 1-Jun-2011 to 28-Sep-2011. These dates, when converted to numbers, are in the range of 40,695 to 40,814 (dates being represented in Excel by the number of days since 1-Jan-1900).

In cell C2 is this formula: =IF($G$1=A2,B2,NA()) which is been copied down column C. The cells from C2:C19 have been formatted using a conditional format that hides any errors - because the formula results in a series of #N/A errors. We could have avoided the errors appearing in column C with this IF function =IF($G$1=A2, B2,"") but if we do this, then the chart will plot a series of zero values which is not what we want so creating errors with our formula is actually the desirable outcome.

To hide the errors, select the cells in column C and choose Conditional Formatting > New Rule, choose Format Only Cells That Contain and from the first dropdown list, select Errors and then set the format so it is white text on a white background - an effective way to hide errors!

The formula in cell G1 is =40000+G3 and cell G3 will be the Cell Link for the Spin Button.

These are the properties for the Spin Button: Current Value 695, Minimum Value 695, Maximum Value 814, Incremental Change 7 and Cell Link G3. Test the Spin Button - as you click it you should see a value appear in column C that corresponds with the date in cell G1. The Minimum Value is the number when added to 40000 gives the date 1-Jun-2011 and the Maximum Value + 40000 gives you the date 28-Sep-2011. We used an Incremental Change of 7 so the dates we see in cell G1 are spaced one week apart to match the dates in column A. As you click the arrows on the Spin Button, the contents of G3 change to be one of the dates from column A.

Creating an interactive chart with a Spin Button

Add the chart

The chart is created using the range A1:C19 and it is created as a column chart. The chart is sized to cover contents of column C but still display row 1 of the worksheet.

To format the chart I right clicked the single bar that is visible for Series 2 and selected Change Series Chart Type and chose Line Chart With Markers. Right click the marker, choose Format Data Series and set this to an attractive marker style. Right click the marker again and choose Add Data Labels and then click the Legend to select it and delete it.

Now, when you click on the Spin Button the marker moves up and down the chart to highlight the sales for the date that appears in cell G1 and the label shows the unit of sales next to the marker.

Interactive chart with a Spin Button

There are innumerable ways to incorporate Spin Buttons and Scroll Bars into your worksheets. You can use them for data entry or, as I've shown here, to make charts more interactive.

See also

21 responses to "Interactive elements in Excel with Spin Buttons and Scroll Bars"

  1. Simon Allan says:

    Hi Helen,
    I'm trying to use a scroll bar with a sliding percentage which I have now done. But what I want to do for example, I want to add to a number a sliding percentage 12 + 14% = 13.68 or 12 + 18% = 14.16.
    The problem I seem to be having is that I can't get the sliding percentage to work in a seperate cell.
    Could you help?
    Regards Simon

  2. Radhika says:

    I am not able to see the "control" option in format control option while creating scroll bar please help.

  3. Ruvini says:

    I used the spin button and it worked but I wanted to male the increment by 0.1, but it didn't work. please help.

  4. Angela says:

    I am trying to set up a spreadsheet with scroll bars. I need column b5 to start at 10 and then b6 to be 20. Do I do this using the developer tab, insert, scroll bar, and then enter my values. I did this but I can't seem to get the values to change to anything but 10. I need them to go from 10 to 1190 increments of 10 in my order column? Please help

  5. ben says:

    I would like to use a spin button to increase a row of numbers by 1 for each click,
    using the form controls. Is there a formula to do that?

  6. Emma says:

    Please could you tell me if it is it possible to control the spin button from an external physical clicker? I would like to use the type of clicker you would use to control a power point presentation to control the spin button. Any help would be greatly appreciated, thankyou!

  7. cj says:


    Is it not possible to get a spin button to count into the negative?

  8. Emmy says:


    I would like to insert a spin button for data containing Weeks of the Year (1-54) in a Row in an excel 2007 sheet. However, I would like to see the entire column under a selected week of the year highlighted as I spin across the weeks


    • Alexander says:

      Hello Emmy,

      Please post a small sample workbook with your data and the result you want to get on our forums. Our support team will look into your task and try to help.

  9. nay nay says:

    can the spin button be used to change the names of sheets

  10. kadrleyn says:

    hi,thanks for infos.
    I've used the spinButton with listbox.Namely, to view the data in the listbox(down/up).
    You can view :

  11. Sharon says:

    I have been using scroll chart(values) for a while but now would like to add a second series (percentage) to the chart... is this possible.. thx

  12. Lungi says:

    Good Day

    I would like to know how to use a scroll button to page through an excel worksheet. I have 200 graphs and would like to see six graphs at a time.

  13. sushma says:


    I want to create the Minutes of meeting list in the excel sheet. using the macros,spin button can any one help me out with this.

    I have so much of list to do,

  14. lina says:

    hi i wanted to ask if the scroll button can change the cell link automatically each day according to the date i mean can the spin button move from the raw with yesterday's date to today's date with changing the cell link on its own

  15. Harold says:

    Great article! I was wondering if you might have some advice for me. I am using spin buttons linked to cells on a separate tab to increase the first cell by 0.5 increments. It works great, however I would like to find a way to format the control to link in such a way that when I drag the fill handle on the first cell, the spin buttons in the cells below link to the corresponding rows on the other tab. I am trying to prevent having to go into the format control each time a line is added to the sheet. I hope my wording makes sense.

  16. Celia says:

    What would be the formula to make a work week (row A across) switch from one to the next with a spin button?

  17. Paul says:

    I'd like to use spin buttons to vote for the top 25 items in a list of around 30. Is there any way I can prevent anyone incrementing more than 25 of te 30 spin buttons? Any ideas on how to make voting blind, by having the spreadsheet in the cloud and each person who enters doesn't see the previous votes but tehy are still accumlated in the chart?

  18. Mark H says:

    I would like to set up a chart that allows the KPI targets to change based on the % required can you use a spin tool for that?

  19. Tore says:

    I would like to use a scroll button or any button to increment a cell by 1, but only increasing, not decreasing.

Post a comment

Thank you for your comment! When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to your query. We cannot guarantee that we will answer every question, but we'll do our best :)