ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Load active cell data via a function (https://www.excelbanter.com/excel-worksheet-functions/6982-load-active-cell-data-via-function.html)

Mike G - D.C.

Load active cell data via a function
 
Hello-
Is there anyway to set up a cell to display whatever is within the active
cell? In other words, I'm looking to setup A1 to display data from whichever
cell is currently active/selected within the document. Is this possible?
Thanks

N Harkawat

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells(1, 1) = ActiveCell.Value

End Sub


"Mike G - D.C." wrote in message
...
Hello-
Is there anyway to set up a cell to display whatever is within the active
cell? In other words, I'm looking to setup A1 to display data from

whichever
cell is currently active/selected within the document. Is this possible?
Thanks




hgrove


N Harkawat wrote...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells(1, 1) = ActiveCell.Value
End Sub

...

Quibble: this would only work within a particular worksheet, not within
the entire document/workbook. Workbook_SheetSelectionChange would be
more appropriate.


--
hgrove
------------------------------------------------------------------------
hgrove's Profile: http://www.excelforum.com/member.php...o&userid=11432
View this thread: http://www.excelforum.com/showthread...hreadid=319888



All times are GMT +1. The time now is 04:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com