show x and y of the cell

W

Wu

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

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

e.g the cursor stops at C3, then range("A1") shows ----> 3,3

or, the cursor stops at B2, then range("A1") shows ----> 2,2

How to write in macro for this effect?
 
D

Dave Peterson

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

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

e.g the cursor stops at C3, then range("A1") shows ----> 3,3

or, the cursor stops at B2, then range("A1") shows ----> 2,2

How to write in macro for this effect?
 
D

dksaluki

However you are running your macro, i think if you just add at the end
of it:

Range("A1").Value = ActiveCell.Address(false,false)

...the (false,false) is for Row absoulte, so you'll have to set it as
either true or false, depending on if you want to show the dollar
signs in cell A1 or not. I think false false will display $B$2 for
example. true true is B2. but you'll have to check.

hope this helps
dk
 

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