list all sheet names between sheet x and sheet y

J

Jacob Skaria

Replace the "x" and "y" in the below with the start and end sheet names

For intTemp = Sheets("X").index to Sheets("Y").index
Range("A" & 43+intTemp) = Sheets(intTemp).Name
Next intTemp

If this post helps click Yes
 
R

Rick Rothstein

The way you set the limits for intTemp, the odds are great that the list
won't start in cell A44 as the OP requested. This way should work...

Start = Sheets("X").Index
Finish = Sheets("Y").Index
For intTemp = Start To Finish
Cells(44 + intTemp - Start, "A").Value = Sheets(intTemp).Name
Next
 
R

Rick Rothstein

If you really expect to get help on a problem you are having, you simply
have to provide useful feedback. "Didn't work" gives us no clue what the
problem is (did the code not run, did it run but put the wrong information
in the cells, did it make your computer blowup, etc.), so it is kind of hard
to figure out what advice to give you next. In the future, don't say "didn't
work", tell us what happened that you didn't want to happen.
 
J

Jacob Skaria

For intTemp = Sheets("X").index to Sheets("Y").index
Sheets("A").Range("A" & 43+intTemp) = Sheets(intTemp).Name
Next intTemp

If this post helps click Yes
 
J

J.W. Aldridge

Thanx Mr. Jacob!
Worked purfetly!

Noted Mr. Rick
(I kinda thought since it seemed so simple no additional info was
needed)
Thanx anyhow.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top