Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting Worksheet name in Reference Style

I want to get the address of a cell I am referencing. If I use
Address(external=:True) then I get the workbook name included in the
reference. If I use AddressLocal I get just the row/column reference.
How can I get the address where it looks like =TRAVEL!$A$10, where
TRAVEL is the name of the worksheet where the cell resides?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Getting Worksheet name in Reference Style

This should give you a good start.

wsName = ActiveSheet.Name
cellAdress = ActiveCell.Address

Where is this to be displayed?


wrote in message
ups.com...
I want to get the address of a cell I am referencing. If I use
Address(external=:True) then I get the workbook name included in the
reference. If I use AddressLocal I get just the row/column reference.
How can I get the address where it looks like =TRAVEL!$A$10, where
TRAVEL is the name of the worksheet where the cell resides?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Getting Worksheet name in Reference Style

If you are building a formula, you probably don't need to worry about it.

Excel will clean it up when you enter it as a formula.


just to demo from the immediate window:

Worksheets("Sheet1").range("C2").Formula = "=" & _
Worksheets("Sheet2").Range("B9").Address(0,0,xla1, true)
? worksheets("Sheet1").Range("C2").formula
=Sheet2!B9


--
Regards,
Tom Ogilvy

" wrote:

I want to get the address of a cell I am referencing. If I use
Address(external=:True) then I get the workbook name included in the
reference. If I use AddressLocal I get just the row/column reference.
How can I get the address where it looks like =TRAVEL!$A$10, where
TRAVEL is the name of the worksheet where the cell resides?


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
Req help on Formula or vb in excel to calculate between reference style and formula style tia sal2 temp Excel Discussion (Misc queries) 1 September 13th 07 09:02 AM
Req help on Formula or vb in excel to calculate between reference style and formula style tia sal2 temp Excel Worksheet Functions 1 September 13th 07 09:02 AM
R1C1 reference style Helpme Please[_2_] Excel Discussion (Misc queries) 5 July 11th 07 11:12 PM
can a1 reference style and r1c1 style be used in same formula? rjagga Excel Worksheet Functions 1 September 17th 06 10:58 AM
R1C1 reference style Peg P Excel Discussion (Misc queries) 2 November 15th 05 06:48 PM


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

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"