show the x and y of a cell

W

Wu

I have written a macro that the cursor will stop at uncertain cell everytime
finally.

when the cursor stop, I would like to show the x and y of the cell at
range("A1")

For example, after running the marco, the cursor stop at range("C3")

I want that in range("A1") will show --------> 3,3
if cursor stops at range("B2"), the range("A1") will show ---------> 2,2
 
D

Dave Peterson

Is that row,column?

If yes, you could use:

dim myCell as range
....
with activesheet
set mycell = .cells(33, 11) 'however your macro stops????
with .range("a1")
.numberformat = "@" 'text
.value = mycell.row & "," & mycell.column
end with
end with
 

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

Top