ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Populate Data Validation List (https://www.excelbanter.com/excel-programming/408426-populate-data-validation-list.html)

Steve[_4_]

Populate Data Validation List
 
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?

Gary''s Student

Populate Data Validation List
 
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

--
Gary''s Student - gsnu2007g


"Steve" wrote:

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?



All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com