VBA Cell row-column numbers to variable

J

Joe

In VBA, I need code that will let met set a variable equal
to the current cell in the Excel spreadsheet's row number
and set a second variable equal to the current cells
column number. i.e. if cell B3 is picked in the
spreadsheet and I run the macro I want the VBA code to set
variable R1 = 3 and set variable C1 = 2 since cell B3 is
picked. Your help is appreciated.
 
S

steve

Joe,

Don't recommend using R1 & C1 since they could represent cell addresses.

crow = Activecell.Row
ccol = Activecell.Column

steve
 

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