I'm trying to add a list to a cell with a macro. I am using a list of cells as the options for the list in the target cell. Unfortunately, this list is going to change in length and I can't figure out how to add a range for this kind of setup. I know the location of the first cell (RowStart), and I can search for the last cell in the macro (RowEnd), but I can't put them in after "Formula1:=". How do I add the range into this?
Sub UpdateBldgs() Set RowStart = Worksheets("Update Sheet").Cells(3, 12) Set RowEnd = Worksheets("Update Sheet").Cells(Range("L" & Rows.Count).End(xlUp).Row, 12) x = RowStart.Address() y = RowEnd.Address() Range("C1").Select With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:= ? .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With