ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there a function that will return info of the cursor location? (https://www.excelbanter.com/excel-worksheet-functions/26172-there-function-will-return-info-cursor-location.html)

cbre_bryork

Is there a function that will return info of the cursor location?
 
Is there a function that I could place in cell A1 that will return
information on whatever cell is selected in on the spreadsheet? So for
instance, if the current cursor position is in cell D3, I would like cell A1
to display "D3". And if I move the cursor to cell E5, I would like cell A1
to display "E5"

Bob Phillips

Not a function but event code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Range("I1").Value = Target.Address(False, False)
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"cbre_bryork" wrote in message
...
Is there a function that I could place in cell A1 that will return
information on whatever cell is selected in on the spreadsheet? So for
instance, if the current cursor position is in cell D3, I would like cell

A1
to display "D3". And if I move the cursor to cell E5, I would like cell

A1
to display "E5"




Tom Ogilvy

For a formula only partial solution:

=CELL("Address")

But this will only update when a calculation occurs - not when the cell is
selected. .


--
Regards,
Tom Ogilvy



"cbre_bryork" wrote in message
...
Is there a function that I could place in cell A1 that will return
information on whatever cell is selected in on the spreadsheet? So for
instance, if the current cursor position is in cell D3, I would like cell

A1
to display "D3". And if I move the cursor to cell E5, I would like cell

A1
to display "E5"




Biff

Hi!

Just wondering.....why do you need a function/formula/code to do this?

Right now, if you look directly above cell A1 you'll see what cell is
selected. (unless you have chosen to not display the formula bar)

Biff

"cbre_bryork" wrote in message
...
Is there a function that I could place in cell A1 that will return
information on whatever cell is selected in on the spreadsheet? So for
instance, if the current cursor position is in cell D3, I would like cell
A1
to display "D3". And if I move the cursor to cell E5, I would like cell
A1
to display "E5"





All times are GMT +1. The time now is 12:16 AM.

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