Spinbutton to select values from list

Jagat Pavasia

Active Member
Joined
Mar 9, 2015
Messages
404
Office Version
  1. 2021
Platform
  1. Windows
hi ,
I have number in cell from C6 to C2500. something like 255, 240.50, 266.67, 312.25, 20.10 etc.

I had insert spin tool from developer and i want to spin only this number in my A1 cell.

so what i do ?




this is image of my worksheet

https://ibb.co/3r9pQCJ
 
With numbers in range C6:C2500

Formula in A1
=IFERROR(IF(B1*C1=0,"",C1),"")

Formula in C1
=IFERROR(INDEX($C$6:$C$2500,MATCH(0,INDEX(COUNTIF($E$5:OFFSET($E$5,B1-1,0),$C$6:$C$2500),0,0),0)),"")

Spin Button format control settings
- Link cell is B1
- Minimum value = 0
- maximum value = 2495 - incremental change = 1


In picture below you can see in column E what happens every Spin (click)
Shaded cells in column C are dupllicte values (which are ignored)
Row 10 is what happens on Spin 5Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][th]
F
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]
12
[/td][td]
5
[/td][td]
12​
[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td][/td][td][/td][td]Data[/td][td]
Click
[/td][td]
Value
in A1​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td][/td][td][/td][td]
11​
[/td][td]
_01​
[/td][td]
11​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td][/td][td][/td][td]
13​
[/td][td]
_02​
[/td][td]
13​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
8
[/td][td][/td][td][/td][td]
16​
[/td][td]
_03​
[/td][td]
16​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
9
[/td][td][/td][td][/td][td]
20​
[/td][td]
_04​
[/td][td]
20​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
10
[/td][td][/td][td][/td][td]
12​
[/td][td]
_05
[/td][td]
12
[/td][td]5th click[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
11
[/td][td][/td][td][/td][td]
15​
[/td][td]
_06​
[/td][td]
15​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
12
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
15​
[/td][td]
_07​
[/td][td]
14​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
13
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
15​
[/td][td]
_08​
[/td][td]
10​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
14
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
13​
[/td][td]
_09​
[/td][td]
98​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
15
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
15​
[/td][td]
_10​
[/td][td]
96​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
16
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
12​
[/td][td]
_11​
[/td][td]
94​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
17
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
12​
[/td][td]
_12​
[/td][td]
93​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
18
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
16​
[/td][td]
_13​
[/td][td]
91​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
19
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
16​
[/td][td]
_14​
[/td][td]
95​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
20
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
15​
[/td][td]
_15​
[/td][td]
90​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
21
[/td][td][/td][td][/td][td]
14​
[/td][td]
_16​
[/td][td]
99​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
22
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
16​
[/td][td]
_17​
[/td][td]
92​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
23
[/td][td][/td][td][/td][td]
10​
[/td][td]
_18​
[/td][td]
97​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
24
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
14​
[/td][td]
_19​
[/td][td]
123​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
25
[/td][td][/td][td][/td][td=bgcolor:#FFF2CC]
12​
[/td][td]
_20​
[/td][td]
161​
[/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet3[/td][/tr][/table]
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top