Insert multiple values in 1 cell and using data validation

Hidden Dan

Board Regular
Joined
Dec 7, 2016
Messages
63
A spreadsheet needs option to insert 2 different dates. It allows user to select one the 2. This can normally be done with 'Data Validation', selecting "List" and fill in "Source". Source may be a list elsewhere but can also be typed in directly by typing e.g. 1;2;3 . This method works for normal spreadsheets.

If I record a macro it looks like this :


Sub Macro1()


With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="1;2;3"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub


My question is "how can I interrupt macro at "Formula1:=", allow user to type in 2 values and resume macro execution ? Typing values may be done purely manual by typing values and separating them by ";".

Note: I use a non-English language Excel version, so maybe some confusion may arise when separating items (swapping "," for ";").


Thanks for your help

Dan
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

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