Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
radulucian
 
Posts: n/a
Default using the name of the worksheet as argument


I need to use the name of the currrent worksheet as an argument for a
function in that worksheet.

Is there a way to get that name through some system variable or smthg
and use it in a LOOKUP, IF or any other function for that matter ?

I searched the forums but no clue so far. Any help appreciated.


--
radulucian
------------------------------------------------------------------------
radulucian's Profile: http://www.excelforum.com/member.php...o&userid=29393
View this thread: http://www.excelforum.com/showthread...hreadid=491042

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
radulucian
 
Posts: n/a
Default using the name of the worksheet as argument


after looking it up for hours, i found the answer myself in less then 5
minutes after posting this. for the records, here it is:

The Cell function returns information about the formatting, location,
or contents of the upper-left cell in a reference.

To get the sheet name:
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

To get the workbook name:
=MID(CELL("filename"),FIND("[",CELL("filename"))+1,(FIND("]",CELL("filename"))+1)-FIND("[",CELL("filename"))-2)

To get the path address & workbook name:
=CELL("filename")

To get the path address:
=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

oh, got it from exceltip.com


--
radulucian
------------------------------------------------------------------------
radulucian's Profile: http://www.excelforum.com/member.php...o&userid=29393
View this thread: http://www.excelforum.com/showthread...hreadid=491042

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default using the name of the worksheet as argument

You should add a reference to each =cell("filename").

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

You may find that you get the wrong name if you don't include that.

radulucian wrote:

after looking it up for hours, i found the answer myself in less then 5
minutes after posting this. for the records, here it is:

The Cell function returns information about the formatting, location,
or contents of the upper-left cell in a reference.

To get the sheet name:
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

To get the workbook name:
=MID(CELL("filename"),FIND("[",CELL("filename"))+1,(FIND("]",CELL("filename"))+1)-FIND("[",CELL("filename"))-2)

To get the path address & workbook name:
=CELL("filename")

To get the path address:
=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

oh, got it from exceltip.com

--
radulucian
------------------------------------------------------------------------
radulucian's Profile: http://www.excelforum.com/member.php...o&userid=29393
View this thread: http://www.excelforum.com/showthread...hreadid=491042


--

Dave Peterson
Reply
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
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


All times are GMT +1. The time now is 11:29 AM.

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

About Us

"It's about Microsoft Excel"