Determining cursor position in a named range
On Feb 6, 9:12*am, John wrote:
what macro code do I use to find the row and column position of the cursor in
a named range table on a worksheet?
If the cursor is not exatactly in the named range, I'd like to determine the
row if that is win the table, the column if that is in the table, or if both
are out of the table range.
I appreciate your help, -John
John,
You can use the Row and Column property of a Range object. For
example, the following code will print the results to the Immediate
Window.
'This is for the ActiveCell
Debug.Print ActiveCell.Row
Debug.Print ActiveCell.Column
'This is for a specified range location
Debug.Print Range("AA5").Row
Debug.Print Range("AA5").Column
Matt
|