ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to showing a Col,Row in a variable (https://www.excelbanter.com/excel-programming/368615-how-showing-col-row-variable.html)

gj[_2_]

How to showing a Col,Row in a variable
 
How do you store the col letter and the row number into a variable

Thanks,
GJ


Tom Ogilvy

How to showing a Col,Row in a variable
 
var = activecell.Address(0,0)

rw = ActiveCell.Row
col =
Left(ActiveCell.Address(0,0),Instr(2,ActiveCell.Ad dress,"$",vbTextcompare)-2)

Demo'd from the immediate window
Range("B9").Select
?
Left(ActiveCell.Address(0,0),Instr(2,ActiveCell.Ad dress,"$",vbTextcompare)-2)
B
Range("IV10").Select
?
Left(ActiveCell.Address(0,0),Instr(2,ActiveCell.Ad dress,"$",vbTextcompare)-2)
IV

--
Regards,
Tom Ogilvy



"gj" wrote in message
ups.com...
How do you store the col letter and the row number into a variable

Thanks,
GJ





All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com