Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 158
Default display current cell contents in another worksheet

I have used the following formula to display the contents of the current cell
(since last refresh - update using F9):

=INDIRECT(CELL("address"))

Can I do anything similar to display the current cell in a different
worksheet?

TIA.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 434
Default display current cell contents in another worksheet

hi, andy !

I have used the following formula to display the contents of the current cell (since last refresh - update using F9):
=INDIRECT(CELL("address"))
Can I do anything similar to display the current cell in a different worksheet?


IMHO, main issue is the fact that CELL(...) info_WF changes accordingly to 'activecell' in activesheet

if you don't mind to use a UDF... [Chip Pearson: - http://tinyurl.com/26lw6l]

1) put the following on *every* WS code module:
Public currentCell As String
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
currentCell = "'" & Me.Name & "'!" & ActiveCell.Address
End Sub

2) the following goes on a standard code module:
Function currentCell_In(mySheet As String) As String
currentCell_In = Worksheets(mySheet).currentCell
End Function

3) you can use in your WS +/- as follows:
=indirect(currentCell_In("sheet1"))

OR... avoid indirect 'volatile' WF and make volatile your UDF...
a) in your standard code module:
Function currentCell_In(mySheet As String) As String
Application.Volatile
currentCell_In = Evaluate(Worksheets(mySheet).currentCell)
End Function

b) usage: currentCell_In("sheet1")

and/or modify, adapt, ... as needed ;)
hth,
hector.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 158
Default display current cell contents in another worksheet

Thanks. I went in a different direction, but I appreciate the response and
know that others who find this will use your suggestion.

"Héctor Miguel" wrote:

hi, andy !

I have used the following formula to display the contents of the current cell (since last refresh - update using F9):
=INDIRECT(CELL("address"))
Can I do anything similar to display the current cell in a different worksheet?


IMHO, main issue is the fact that CELL(...) info_WF changes accordingly to 'activecell' in activesheet

if you don't mind to use a UDF... [Chip Pearson: - http://tinyurl.com/26lw6l]

1) put the following on *every* WS code module:
Public currentCell As String
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
currentCell = "'" & Me.Name & "'!" & ActiveCell.Address
End Sub

2) the following goes on a standard code module:
Function currentCell_In(mySheet As String) As String
currentCell_In = Worksheets(mySheet).currentCell
End Function

3) you can use in your WS +/- as follows:
=indirect(currentCell_In("sheet1"))

OR... avoid indirect 'volatile' WF and make volatile your UDF...
a) in your standard code module:
Function currentCell_In(mySheet As String) As String
Application.Volatile
currentCell_In = Evaluate(Worksheets(mySheet).currentCell)
End Function

b) usage: currentCell_In("sheet1")

and/or modify, adapt, ... as needed ;)
hth,
hector.



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
Change another cell's contents from current cell??? HandsomeJake Excel Discussion (Misc queries) 1 March 12th 07 12:42 AM
How to get current worksheet name to display in a cell? xfixiate Excel Worksheet Functions 2 July 22nd 06 09:24 AM
Display multiple tabs in current worksheet MLK Excel Worksheet Functions 0 July 18th 06 02:43 PM
Can I lock cell contents after current date is past? Excel User Greg Excel Worksheet Functions 0 January 16th 06 06:47 PM
Current contents of the cell pointer? John Tucker Excel Discussion (Misc queries) 1 June 19th 05 11:26 PM


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