View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default How can I get a cursor location to use in a formula (e.g. IF A1,"Y

You would need to use the Selection change event of the worksheet: copy this code, right-click the
sheet tab, select "View Code" and paste the code into the window that appears.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "The Activecell is " & ActiveCell.Address(False, False)
End Sub

HTH,
Bernie
MS Excel MVP


"rfp330" wrote in message
...
I want to be able to display text in a cell based on where the cursor is
located.

An example would be if cell a1 is selected by placing the cursor in A1, a
text box below would display a message. Can't seem to find any help text on
this.