ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sheet Name to Fill Cell (https://www.excelbanter.com/excel-discussion-misc-queries/184153-sheet-name-fill-cell.html)

roadkill

Sheet Name to Fill Cell
 
Good afternoon good people,

I was just wondering if it is possible to fill a field with a sheet name. So
if my sheet is named John Doe, can cell A1 be prefilled with that name?

Thank you

PCLIVE

Sheet Name to Fill Cell
 
Your workbook has to be saved in order for this to work.

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

HTH,
Paul

--

"RoadKill" wrote in message
...
Good afternoon good people,

I was just wondering if it is possible to fill a field with a sheet name.
So
if my sheet is named John Doe, can cell A1 be prefilled with that name?

Thank you




Max

Sheet Name to Fill Cell
 
"RoadKill" wrote:
I was just wondering if it is possible to fill a field with a sheet name. So
if my sheet is named John Doe, can cell A1 be prefilled with that name?


The book must be saved first

Click Insert Name Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")))+1,32)
Click OK

The above defines WSN as a name we can use to refer to the sheetname in
formulas. It will auto-extract the sheetname implicitly. Technique came from
a post by Harlan.

Test it out:
In any sheet, in any cell, put: =WSN,
and that cell will return the sheet's name
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Rick Rothstein \(MVP - VB\)[_331_]

Sheet Name to Fill Cell
 
If the Excel file has been saved...

=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

Rick


"RoadKill" wrote in message
...
Good afternoon good people,

I was just wondering if it is possible to fill a field with a sheet name.
So
if my sheet is named John Doe, can cell A1 be prefilled with that name?

Thank you



David Biddulph[_2_]

Sheet Name to Fill Cell
 
Use the CELL function with the "filname" argument:
http://www.ozgrid.com/Excel/variable...heet-names.htm
http://www.exceltip.com/st/Cell_Func..._Path/180.html
http://www.cpearson.com/excel/excelf.htm
http://www.mcgimpsey.com/excel/formu..._function.html
--
David Biddulph

"RoadKill" wrote in message
...
Good afternoon good people,

I was just wondering if it is possible to fill a field with a sheet name.
So
if my sheet is named John Doe, can cell A1 be prefilled with that name?

Thank you




roadkill

Sheet Name to Fill Cell
 
Thanks everyone. Some genius created a workbook with a ton of sheets with the
name of the individual being scored listed dozens of times on each sheet. So
any shortcut is good.

"David Biddulph" wrote:

Use the CELL function with the "filname" argument:
http://www.ozgrid.com/Excel/variable...heet-names.htm
http://www.exceltip.com/st/Cell_Func..._Path/180.html
http://www.cpearson.com/excel/excelf.htm
http://www.mcgimpsey.com/excel/formu..._function.html
--
David Biddulph

"RoadKill" wrote in message
...
Good afternoon good people,

I was just wondering if it is possible to fill a field with a sheet name.
So
if my sheet is named John Doe, can cell A1 be prefilled with that name?

Thank you






All times are GMT +1. The time now is 08:56 AM.

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