address location

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am preparing a formula which needs the address of the first cell located
above the active cell that contains information . The key strokes would
normally be "=" then "ctrl + {up}" then "{enter}". What macro language would
achieve this result.
 
I think I would play it safe in case two or three cells immediately above
contains data:

If ActiveCell. Offset(-1, 0) <> "" Then
ActiveCell.Offset(-1, 0).Activate
Else
ActiveCell.End(xlUp).Activate
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top