Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default SheetName Worksheet Function

Is there a worksheet function that returns the name of the sheet the cell is
on? (Much like the way ROW() and COLUMN() return the cell's position)

=ROW()
=COLUMN()
=SHEETNAME()

the ADDRESS function I thought would work but it only accepts a literal
string that is then appended to the address generated by ROW and COLUMN.

=ADDRESS(ROW(),COLUMN(),,,"Sheet1")

I need this:

=ADDRESS(ROW(),COLUMN(),,,???YouTellMe)

TIA
Charlie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default SheetName Worksheet Function

See this page Charlie
http://www.xldynamic.com/source/xld.xlFAQ0002.html

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Charlie" wrote in message ...
Is there a worksheet function that returns the name of the sheet the cell is
on? (Much like the way ROW() and COLUMN() return the cell's position)

=ROW()
=COLUMN()
=SHEETNAME()

the ADDRESS function I thought would work but it only accepts a literal
string that is then appended to the address generated by ROW and COLUMN.

=ADDRESS(ROW(),COLUMN(),,,"Sheet1")

I need this:

=ADDRESS(ROW(),COLUMN(),,,???YouTellMe)

TIA
Charlie

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default SheetName Worksheet Function

Very good idea. Now you see why I was wanting a SHEETNAME function! What a
bunch of rigamarole to get something so simple! I too found the CELL
function but noticed the changing reference problem. I didn't think about
the anchor-it-with-a-cell-reference idea. Looks good, I may give it a try.

I'm having a problem with workbooks not recalculating as expected when
opened with a newer version of Excel. Reports are generated on a server and
when viewed there they work fine. But when they are copied to a local
workstation having a newer version of Excel they don't work.

I have verified that the workbook is being recalculated when opened for the
first time with the newer Excel. This is not a problem in itself. The
problem is that the sheets are not activated as the recalculating is done.
Some of my formulas use macro functions that are expecting the cells to be on
the active sheet. This results in all sheets having the values from whatever
sheet was active when the workbook was closed.

So... to make a long story longer... I was going to modify my functions to
use the actual sheets(sheetname).cells of the formula location. Problem is
my functions are also accepting named ranges (sheet-level), which I presume
will also fail due to the sheet not being active. Oh, it never ends!

I think I'll just remove the macro functions from the formulas and run the
functions in the report macros at gen time.

Thanks for the help.

Charlie

"Ron de Bruin" wrote:

See this page Charlie
http://www.xldynamic.com/source/xld.xlFAQ0002.html

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Charlie" wrote in message ...
Is there a worksheet function that returns the name of the sheet the cell is
on? (Much like the way ROW() and COLUMN() return the cell's position)

=ROW()
=COLUMN()
=SHEETNAME()

the ADDRESS function I thought would work but it only accepts a literal
string that is then appended to the address generated by ROW and COLUMN.

=ADDRESS(ROW(),COLUMN(),,,"Sheet1")

I need this:

=ADDRESS(ROW(),COLUMN(),,,???YouTellMe)

TIA
Charlie


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
what's the function to return a sheetname in a cell in Excel? judi Excel Worksheet Functions 3 October 2nd 08 11:43 PM
Automatically update SheetName in workbook sub if SheetName changes [email protected] Excel Discussion (Misc queries) 3 February 29th 08 04:33 PM
Does anyone see this .xls]sheetname? Eric Excel Discussion (Misc queries) 2 January 21st 07 03:04 PM
Using a cell to reference sheetname in vlookup function jnasr Excel Worksheet Functions 1 October 25th 06 05:06 PM
SheetName Function EXCEL$B!!(BNEWS Excel Programming 6 April 17th 06 08:04 AM


All times are GMT +1. The time now is 07:48 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"