![]() ErrorMessage = "Please select a value from the drop-down list available. Add xlValidateList, xlValidAlertStop, Operator:=xlBetween, Formula1:="=Sheet2!$A$1:$A$5 & Sheet2!$C$1:$C$7" In the Source box, enter 'MyTimeList' (without the quote marks). Click on Data Validation, select Data Validation. If Not Intersect(Target, Range("E5")) Is Nothing Then Then select the cell (s) that you want the drop-down to appear in, and go to the Data tab on the Ribbon. This is my code thus far, any help is genuinely appreciated: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Note that if the cell already has data in it, it will keep it as long as that data item is in the list created in step 2 above. IgnoreBlank = True still shows the blanks in the drop-down list. In the new tab list each of the items you want in the list (this can be changed later) In the original tab click on the cell you want to have the dropdown list appear in. Does anyone know how I can add two ranges into my Formula1?Īlso, I dont want the blanks in the ranges to appear in the Drop-down list but. However, my code below is not working, it runs an error 1004 at Add xlValidateList, xlValidAlertStop, Operator:=xlBetween, Formula1:="=Sheet2!$A$1:$A$5 & Sheet2!$C$1:$C$7" I suspect it has something to do with this line. My range of values for the drop-down should come from Range(A1:A5) in Sheet2 and Range(C1:C7) in Sheet2. In the Save as Type drop-down list, select Excel Add-In (.xlam). ![]() I want to create a drop-down list in Cell E5.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |