Autopopulate cell name with tab name

N

Neall

I have about 100 tabs each signifying a customer profile what I need now is
to automatically take the worksheet name (customer number) and give a cell
that name so cell 1A would have a name of 123456

The reason I need to do this is because I am using a template for all tabs
and as long as this one variable in the template changes to reflect the
customer number then each sheet will work independently when I do a full
update of all sheets.

Any suggestions?

Thanks in advance
 
J

Jacob Skaria

Do you mean to return sheetname. Try this formula in A1

=REPLACE(CELL("Filename"),1,FIND("]",CELL("filename")),"")

If this post helps click Yes
 
S

Shane Devenshire

Hi,

Try:

=MID(CELL("Filename"),FIND("]",CELL("Filename"))+1,31)

or shorten Jacob's suggestion to

=REPLACE(CELL("Filename"),1,FIND("]",CELL("filename")),)
 
A

Ashish Mathur

Hi,

Go to insert > Name > Define and type a name there, say "names" (w/o
quotes). In the refers to box, type =GET.WORKBOOK(1).

Now in cell C5, type the following formula and copy down

=MID(INDEX(names,,ROW()-ROW($C$4)+1),SEARCH("]",INDEX(names,,ROW()-ROW($C$4)+1),1)+1,LEN(INDEX(names,,ROW()-ROW($C$4)+1))-SEARCH("]",INDEX(names,,ROW()-ROW($C$4)+1),1))&T(NOW())

If you starting cell reference is something else, say G6, then change the
row($C$4) to row($G$5)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
G

Gord Dibben

Must have a cell reference included or each sheet will have same name
returned.

=REPLACE(CELL("Filename",A1),1,FIND("]",CELL("filename",A1)),)


Gord Dibben MS Excel MVP
 

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