LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Sheet references

The code below will list all the sheet names in you workbook to column B and
add the !

Sub getsheetnames()
x = 1
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Worksheets("Sheet1").Cells(x, 2) = ws.Name + "!"
x = x + 1
Next ws
End Sub

Mike

"pablo bellissimo" wrote:

Thanks for the reply.

Is there a way for Excel to find the sheet names without me typing them
though as there will be a large number of sheets.



"Gary''s Student" wrote:

Very easy:

In an unused column, say column B, enter your sheet names exclaimed:

Sales!
Revenue!

The in A1 enter:
=INDIRECT(B1 & "A1")
and copy down

--
Gary''s Student
gsnu200709


"pablo bellissimo" wrote:

Hi All is there a way for me to drag down a formula that will change the
sheet it is looking at in each new cell?

lets say that in cell A1 the formula is =MySheet2!A1

As I replicate this down I want the sheet2 to increase to MySheet3, then
MySheet4 etc. The sheets might not be called 2,3,4,5 etc but I need the
formula to just go to the next sheet regardless of the name of it.

I really hope this makes sense!

Thanks again guys

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sheet/Cell References veryeavy Excel Discussion (Misc queries) 3 December 7th 06 11:37 PM
using cells to define sheet references patrickgamer Excel Discussion (Misc queries) 1 April 27th 06 08:55 PM
rolling sheet references ScottyC Excel Worksheet Functions 4 March 28th 06 08:48 AM
Cross sheet references (=Sheet2!B4) DejaVu Excel Discussion (Misc queries) 3 February 17th 06 04:33 PM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"