Populate Data Validation List

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi. Is it possible to populate a data validation list with the sheet
names in a workbook? And as a sheet is added or sheet name changed,
the list automatically updates?
 
First enter this UDF:

Function sheetname(i As Integer) As String
sheetname = ""
If i > Sheets.Count Then Exit Function
sheetname = Sheets(i).Name
End Function


Then, in an unused column, enter:
=sheetname(ROW()) and copy down
 
Back
Top