Forum Home
Press F1
 
Thread ID: 54187 2005-02-06 06:11:00 Excel Tabs RogerRamjet (7055) Press F1
Post ID Timestamp Content User
321980 2005-02-06 06:11:00 Can anyone tell me how I might be able to reference a worksheet tab label using a formula or macro?

Say I have labelled 7 tabs with the days of the week, how can I get the tab name "Monday" into cell A1?

Cheers.

Roger
RogerRamjet (7055)
321981 2005-02-06 06:25:00 Just use the tab name in your formula followed by an exclamation point and the cell reference from that tab...

for example, =Monday!A1 will return the value of cell A1 from the sheet "Monday". You can put these into the middle of formulae the same way - just insert the tab name before the cell reference.

HTH

Mike.
Mike (15)
321982 2005-02-06 18:27:00 Hi Roger, is the day of the week just an example or what you really want? See the Weekday formula if you just want the days name.

Try the Morefunc addin if you want to return a sheet name via a formula.
longre.free.fr

I believe the function returns a string so you will need to use the INDIRECT function to use it in a formula.

If you want something else then please expand on what you are intending to use it for and I can make a custom function for you.
Parry (5696)
321983 2005-02-06 22:33:00 I guess youll figure it out but just in case Morefunc is a collection of functions. Once installed theres help on each function (a new Morefunc category will be there in the formula wizard) and the specific function you require is SHEETNAME. Details on installation are in the help file. Parry (5696)
321984 2005-02-07 06:24:00 Thanks Mike and Parry for your replies.

Each month I prepare about 10 invoices and the tab names are the invoice numbers. I want that number to appear in a cell so I don't need to enter it manually.

I have downloaded the Morefunc addin and I think the Sheetname function is what I'm after. I'll try it and let you know.

Thanks again.

Roger
RogerRamjet (7055)
321985 2005-02-08 05:30:00 Yes Parry,

Sheetname is exactly the function I need. I'll be applying this to a number of workbooks I have created and expect to save a bit of time.

Thanks again for your help.

Roger :thumbs:
RogerRamjet (7055)
1