Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Cell row-column numbers to variable
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Cell row-column numbers to variable
Joe,
Don't recommend using R1 & C1 since they could represent cell addresses. crow = Activecell.Row ccol = Activecell.Column steve "Joe" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
autofill variable lenght column w/ sequential numbers using VBA | Excel Discussion (Misc queries) | |||
Cell reference with variable column | Excel Worksheet Functions | |||
How a cell can be addressed with variable file-column? | Excel Discussion (Misc queries) | |||
reference cell value from fixed column with variable row | Excel Discussion (Misc queries) | |||
how to create a variable column in cell reference | Excel Worksheet Functions |