LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Cell function

It's even worse than that.

The name of the sheet has to be the same as the workbook (without the
extension).

Worksheet name = Test
workbook name = Test.xls
means no []'s.

I'd use a couple of extra cells.

This will return that test.xls in your situation.

=RIGHT(A1,LEN(A1)-FIND("^^",SUBSTITUTE(A1,"\","^^",LEN(A1)
-LEN(SUBSTITUTE(A1,"\","")))))

then
=left(cellwithformula,len(cellwithformula)-4)

=======
Depending on your filenames and worksheet names, you may want to use a few
cells--one to look for the []'s to see how the name is returned.

ps.

=cell("filename")
will evaluate to the workbook name that was active when excel recalculated.

=cell("filename",a1) will return that workbook/worksheet for the cell with the
formula.

Chris wrote:

Bob I figured out why Excel isn't using brackets when I use
cell("filename")..... If the workbook has only 1 sheet it will not use
brackets and only show you the path and book name. If the workbook has more
than 1 worksheet, it will display the path,book name, and sheet name.

This complicates things because I need to be able to extract the sheet name,
yet all my files only have 1 sheet........

"Chris" wrote:

I'm trying to reference the sheet name of the workbook I'm using.

When I type =Cell("filename") into a cell I get this,

C:\documents and settings\chris\desktop\test.xls

How do I extract just the word test(without the .xls)?


--

Dave Peterson
 
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
CELL Function: cell reference by formula Alex C Excel Worksheet Functions 1 June 19th 06 03:30 PM
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Function that Returns address of that cell? RayWolfDog Excel Worksheet Functions 2 February 15th 06 04:54 PM
Reading Cell Function??? roy.okinawa Excel Worksheet Functions 2 December 1st 05 11:29 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 11:49 PM.

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"