Here is the code I use.
key point is, the validation is entered as a string, not a range. (this avoids the excel bug). this sets a value (the auto cost centre), and then sets the validation to permit an override from preset values.
Sub ManualCostCentre(myRange As Range, mySheet As Worksheet)' run the auto - cost centre routine, then permit a manual override
Dim myCol As Long
Dim myString As String
Call AutoCostCentre(myRange, mySheet)
'prep validation list
myCol = 3
Do While mySheet.Cells(2, myCol + 1).Value <> ""
myCol = myCol + 1
Loop
myString = GetOverrideCCList
With myRange.Offset(, 2).Validation
.Delete
.Add Type:=xlValidateList, Formula1:=myString
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = False
.ShowError = False
End With
End Sub
Function GetOverrideCCList() As String
Dim mySheet As Worksheet
Dim myRow As Long
Dim myString As String
Set mySheet = ThisWorkbook.Worksheets("PM List")
myRow = 4
myString = mySheet.Range("J3").Value
Do While mySheet.Cells(myRow, 10).Value <> ""
myString = myString & "," & mySheet.Cells(myRow, 10).Value
myRow = myRow + 1
Loop
GetOverrideCCList = myString
End Function