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
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Watch MrExcel Video

Forum statistics

Threads
1,122,421
Messages
5,596,033
Members
414,039
Latest member
southike

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
Top