Here's my code:
Unfortunately, I cant get the sequence formula to work in the dropdown - unless I'm doing it wrong.
I'm trying to create dropdowns in a single cell, say B2, from SN001 through SN015 (with the Asset set at 15). In the next cell (B3), the Asset count might change - say 5, so I want the dropdowns to be SN001 through SN005.
I was thinking of using helper cells, but since Asset count will keep changing, it'll change the options in ALL the dropdown. Is there a simple macro way around this? I'm dealing with 35k lines of data, and growing, so Macro is the best way to do it.
How can I do this?
VBA Code:
Sub Macro1()
Asset = 15
'
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=("Sequence(Asset)")
End With
End Sub
Unfortunately, I cant get the sequence formula to work in the dropdown - unless I'm doing it wrong.
I'm trying to create dropdowns in a single cell, say B2, from SN001 through SN015 (with the Asset set at 15). In the next cell (B3), the Asset count might change - say 5, so I want the dropdowns to be SN001 through SN005.
I was thinking of using helper cells, but since Asset count will keep changing, it'll change the options in ALL the dropdown. Is there a simple macro way around this? I'm dealing with 35k lines of data, and growing, so Macro is the best way to do it.
How can I do this?