ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   insert name of sheets into a column A (https://www.excelbanter.com/excel-programming/338704-insert-name-sheets-into-column.html)

sal21[_69_]

insert name of sheets into a column A
 

I have a wbook with many sheets named from 0000 to 9999 (for example
0000, 4300, 4500, 7200...ecc...).

I would want to insert the name of each sheets into the column A of the
sheet LISTA (start the copy name from A3)present into same wbook.

Note: into wbook are present sheets TEST1, TEST2 and TEST3 for thsi
sheets not is important to insert the name into sheet LISTA.


--
sal21


------------------------------------------------------------------------
sal21's Profile: http://www.excelforum.com/member.php...fo&userid=2040
View this thread: http://www.excelforum.com/showthread...hreadid=400386


Tom Ogilvy

insert name of sheets into a column A
 
Dim sh as Worksheet, rw as Long
rw = 2
for each sh in Activeworkbook.Worksheets
if lcase(left(sh.name,4)) < "test" and lcase(left(sh.name,4)) < "list"
then
rw = rw + 1
worksheets("LISTA").Value = "'" & sh.name
end if
Next

--
Regards,
Tom Ogilvy

"sal21" wrote in
message ...

I have a wbook with many sheets named from 0000 to 9999 (for example
0000, 4300, 4500, 7200...ecc...).

I would want to insert the name of each sheets into the column A of the
sheet LISTA (start the copy name from A3)present into same wbook.

Note: into wbook are present sheets TEST1, TEST2 and TEST3 for thsi
sheets not is important to insert the name into sheet LISTA.


--
sal21


------------------------------------------------------------------------
sal21's Profile:

http://www.excelforum.com/member.php...fo&userid=2040
View this thread: http://www.excelforum.com/showthread...hreadid=400386





All times are GMT +1. The time now is 08:43 AM.

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