Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cKBoy
 
Posts: n/a
Default Simple way to get cell location as text "A2"


Is there a simple way that I can get a cell's current location as text
so I can use it on a formula?


For example I have 5 sheets and I want to get all the sum of the CELL
B2 on all the sheets. I would have a formula like
=Sheet2.B2+Sheet3.B2+Sheet4.B2+Sheet5.B2 <-- this formula would be on
Sheet1 B2. I need to get the "B2" from a formula ie.
Sheet2.(row(),column())? or something to this effect. And is there an
easier way to do this just by copying and pasting? or maybe a script?


--
cKBoy
------------------------------------------------------------------------
cKBoy's Profile: http://www.excelforum.com/member.php...o&userid=31522
View this thread: http://www.excelforum.com/showthread...hreadid=512106

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Simple way to get cell location as text "A2"

This will give you Sheet2!plus cell address of active cell in Sheet1

=INDIRECT("Sheet2!"&ADDRESS(ROW(),COLUMN()))



--
Regards,

Peo Sjoblom

Northwest Excel Solutions

Portland, Oregon




"cKBoy" wrote in
message ...

Is there a simple way that I can get a cell's current location as text
so I can use it on a formula?


For example I have 5 sheets and I want to get all the sum of the CELL
B2 on all the sheets. I would have a formula like
=Sheet2.B2+Sheet3.B2+Sheet4.B2+Sheet5.B2 <-- this formula would be on
Sheet1 B2. I need to get the "B2" from a formula ie.
Sheet2.(row(),column())? or something to this effect. And is there an
easier way to do this just by copying and pasting? or maybe a script?


--
cKBoy
------------------------------------------------------------------------
cKBoy's Profile:
http://www.excelforum.com/member.php...o&userid=31522
View this thread: http://www.excelforum.com/showthread...hreadid=512106


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cKBoy
 
Posts: n/a
Default Simple way to get cell location as text "A2"


Hi thanks for the reply, but I tried your suggestion and I get #NAME?
error. Doesn't Inderect need a letter then a number? row() and
column() both return a number.


--
cKBoy
------------------------------------------------------------------------
cKBoy's Profile: http://www.excelforum.com/member.php...o&userid=31522
View this thread: http://www.excelforum.com/showthread...hreadid=512106

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Simple way to get cell location as text "A2"

INDIRECT needs a string which it has, replace that with whatever sheet name
you want.
to test it, open a new workbook that defaults to a sheet named Sheet2 and
put the exact formula in Sheet1 and you'll see it will work, you must either
have edited the formula or missed a part when you copied it

this part

ADDRESS(ROW(),COLUMN())

will always return the address of the cell that holds that formula, wrapped
in indirect if put in let's say Sheet1 A2
it will return what's in Sheet2 A2. Normally when using multiple sheets you
can just use

=SUM(first:last!A2)

and it will sum A2 in all sheets that are in-between first and last with
them included, however using indirect you can't use that although you can
use

=INDIRECT("Sheet2!A2")

you can't use

=SUM(INDIRECT("Sheet2:Sheet4!A2")

but as I said

=INDIRECT("Sheet2!"&ADDRESS(ROW(),COLUMN()))

will return what's in Sheet2 and whatever cell address the formula is in
from another sheet

--
Regards,

Peo Sjoblom

Northwest Excel Solutions

Portland, Oregon




"cKBoy" wrote in
message ...

Hi thanks for the reply, but I tried your suggestion and I get #NAME?
error. Doesn't Inderect need a letter then a number? row() and
column() both return a number.


--
cKBoy
------------------------------------------------------------------------
cKBoy's Profile:
http://www.excelforum.com/member.php...o&userid=31522
View this thread: http://www.excelforum.com/showthread...hreadid=512106


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cKBoy
 
Posts: n/a
Default Simple way to get cell location as text "A2"


Yes, it works! it seems like I just miscopied it or something :) sorry
about that... thank you very much for you help.


--
cKBoy
------------------------------------------------------------------------
cKBoy's Profile: http://www.excelforum.com/member.php...o&userid=31522
View this thread: http://www.excelforum.com/showthread...hreadid=512106



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
How do I set text to top of cell next to wrap text in Excel? Carpenter Gary New Users to Excel 1 October 25th 05 06:26 PM
Text disappears when word wrap is used Mark_GS1CA Excel Discussion (Misc queries) 12 October 17th 05 12:44 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Wrap text limits in Excel 2003 cell formatting Adelrose Excel Discussion (Misc queries) 1 April 19th 05 06:32 PM
On click, copy text into another cell - XL2K Bob the Builder Excel Worksheet Functions 2 March 16th 05 10:03 PM


All times are GMT +1. The time now is 07:43 AM.

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"