You use a scroll bar or spin button to quickly enter or change a range of values. Show Scroll bar Scrolls through a range of values when you click the scroll arrows or when you drag the scroll box. You can move through a page (a preset interval) of values by clicking the region between the scroll box and either scroll arrow. Typically, a user can also type a text value directly in the associated cell or text box. Use a scroll bar for setting or adjusting a large range of values, or for cases when precision is not important. For example, use a scroll bar for a range of percentages that are estimates, or for adjusting color selection in a graduated way.
Spin button Makes it easier to increase or decrease a value, such as a number increment, time, or date. To increase the value, click the up arrow; to decrease the value, click the down arrow. A user can also type a text value directly in the associated cell or text box. Use a spin button, for example, to make it easier to enter a month, day, year number, or to increase a volume level.
Note: Before you add controls to your worksheet, you have to enable the Developer tab. For more information, see Show the Developer tab. Add a scroll bar (Form control)
With these settings, the user can use the scroll bar to enter a precise number or click the area between the scroll bar and arrow to change the value in increments of 5. The following formula in cell D1 returns the exact value that is based on the current value in the linked cell: =IF(C1 > 50, "Acceptable", "Unacceptable") The following array formula in cell D1 assigns a grade to the risk factor, based on the current value in the linked cell. =LOOKUP(A4,{0,20,40,60,80},{"F","D","C","B","A"}) Note: Clicking the left or top scroll arrow after the minimum value has been reached or clicking the right or bottom arrow after the maximum value has been reached has no effect on the value returned. The scroll bar remains at either the minimum or maximum value and does not cycle through the range of allowed values. Add a scroll bar (ActiveX control)
Add a spin button (Form control)
With these settings, the user can click the spin button to enter an age that falls within a minimum and maximum age range. The median age of the employees is 35, and therefore 35 is a good choice to set as the starting value. The following formula in cell D1 determines the length of employment that is based on the current age value in the cell that is linked to the spin button and the employee's age at hire date — the value in B1 (retrieved from another data source). The formula then computes a holiday bonus percentage that is based on years of service: =(C1 - B1)* .01 Note: Clicking the top arrow after the minimum value has been reached or clicking the bottom arrow after the maximum value has been reached has no effect on the value returned. The spin button remains at either the minimum or maximum value and does not cycle through the range of allowed values. Add a spin button (ActiveX control)
|