Use Excel Spin Buttons to Control a Dropdown List
Question details
The user wants to use spin buttons to move through the choices in an Excel dropdown list.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has a data validation dropdown, and the user wants spin button clicks to change its selected value.
- Observed behavior
- The desired result is for each spin button click to select the previous or next list item in the dropdown cell.
Use desktop Excel and make sure the Developer tab is available; Excel for the web cannot run VBA macros. The example below uses Sheet1, dropdown cell A2, linked cell B2, and five list items in E2:E6.
Assign a VBA macro to a Form Control spin button
Use a linked cell to track the list position and a macro to write the corresponding item into the dropdown cell.
Enter five choices in Sheet1 cells E2:E6. Select A2, choose Data > Data Validation, select List, and set the source to =$E$2:$E$6.
Choose Developer > Insert > Spin Button under Form Controls and draw it on Sheet1. Right-click the control, choose Format Control, and on the Control tab set Minimum value to 1, Maximum value to 5, Incremental change to 1, and Cell link to $B$2.
Open Developer > Visual Basic, choose Insert > Module, and paste this code: Sub SpinSelect() Dim ws As Worksheet Dim position As Long Set ws = ThisWorkbook.Worksheets("Sheet1") position = CLng(ws.Range("B2").Value) If position >= 1 And position <= 5 Then ws.Range("A2").Value = ws.Range("E2").Cells(position, 1).Value End If End Sub
Return to Sheet1, right-click the spin button, choose Assign Macro, and select SpinSelect. Set B2 to 1 and select the first list item in A2, then click the spin button arrows to move through the list.
Choose File > Save As and select Excel Macro-Enabled Workbook (*.xlsm). When reopening a trusted workbook, enable its macros if prompted.

Work with Excel spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing spreadsheets. Its support for common Excel formats makes it easy to move everyday files between suites; test VBA and spin button behavior separately, as compatibility may vary.

Frequently Asked Questions
Can a spin button directly change a data validation dropdown?
A Form Control spin button changes its linked cell, not the dropdown selection directly. Assign a macro to the button to read the linked position and write the corresponding list item into the dropdown cell.
Why does manually selecting a dropdown item leave the spin button out of sync?
The example macro updates A2 when the spin button is clicked, but it does not update B2 when A2 is changed manually. Additional VBA is needed to synchronize changes in both directions.
How do I use a longer or shorter list?
Update the Data Validation source, change the Maximum value under the spin button's Format Control settings, and adjust the position limit in the macro to match the number of list items.
Why does the macro disappear when I save the file?
The standard XLSX format does not retain VBA macros. Choose File > Save As and save the workbook as an Excel Macro-Enabled Workbook (*.xlsm).




