ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   list all sheet names between sheet x and sheet y (https://www.excelbanter.com/excel-programming/427401-list-all-sheet-names-between-sheet-x-sheet-y.html)

J.W. Aldridge

list all sheet names between sheet x and sheet y
 
need list to start in cell A44, in sheet "A".

Jacob Skaria

list all sheet names between sheet x and sheet y
 
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
---------------
Jacob Skaria


"J.W. Aldridge" wrote:

need list to start in cell A44, in sheet "A".


J.W. Aldridge

list all sheet names between sheet x and sheet y
 
Didnt work.

Rick Rothstein

list all sheet names between sheet x and sheet y
 
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

--
Rick (MVP - Excel)


"Jacob Skaria" wrote in message
...
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
---------------
Jacob Skaria


"J.W. Aldridge" wrote:

need list to start in cell A44, in sheet "A".



Rick Rothstein

list all sheet names between sheet x and sheet y
 
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.

--
Rick (MVP - Excel)


"J.W. Aldridge" wrote in message
...
Didnt work.



Jacob Skaria

list all sheet names between sheet x and sheet y
 
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
---------------
Jacob Skaria


"J.W. Aldridge" wrote:

Didnt work.


J.W. Aldridge

list all sheet names between sheet x and sheet y
 
Thanx Mr. Jacob!
Worked purfetly!

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

Jacob Skaria

list all sheet names between sheet x and sheet y
 
Cheers..

If this post helps click Yes
---------------
Jacob Skaria


"J.W. Aldridge" wrote:

Thanx Mr. Jacob!
Worked purfetly!

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



All times are GMT +1. The time now is 03:40 AM.

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