MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Column and Row Position


Posted by Azzaino on May 07, 2001 11:50 AM

Hi!!
How can I get column and row at current cursor position? I would like to get col:row ("D12") and also seperated, col "D"/or 4th and row "12".
Thanks in advance.


Posted by IML on May 07, 2001 12:00 PM

You can try:
=ADDRESS(ROW(D12),COLUMN(D12),4)
and
=ROW(D12)&" "&COLUMN(D12)
respectively.

There is probably a way to return D 12 instead of 4 12 in the second formula. I couldn't think of an easy way though.

Good luck

Posted by IML on May 07, 2001 1:09 PM

Getting D 12

Besides my dyslexia on the second formula, this should get you d 12 as opposed to 4 12.

=IF(COLUMN(D12)>26,LEFT(ADDRESS(ROW(D12),COLUMN(D12),4),2)&" "&ROW(D12),LEFT(ADDRESS(ROW(D12),COLUMN(D12),4),1)&" "&ROW(D12))

Posted by Azzaino on May 07, 2001 3:09 PM

Re: Getting D 12

Hi IML!

Thanks a lot!
Actually I need to make a macro, but you gave me the keyword: "address". So I looked up in the help menu and there is "address property.
Thanks!