Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range column and row using variables
Hello,
I have been successful at using a singular variable to be used in the Range property, such as Workbooks("date_tracking.xls").Sheets("parameters" ).Range("B" & i).Value But can't seem to figure out how to use 2 variables, 1 for row and 1 for column. strCol = "B" i = 2 Workbooks("date_tracking.xls").Sheets("parameters" ).Range(strCol & i).Value Could someone enlighten me as to my mistake and the proper synthax. Thank you, Daniel P |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range column and row using variables
What you have should work however you are better off with Cells than Range in
this case... Workbooks("date_tracking.xls").Sheets("parameters" ).Cells(i, strCol).Value Double check the spelling of your workbbok and sheet... -- HTH... Jim Thomlinson "Daniel" wrote: Hello, I have been successful at using a singular variable to be used in the Range property, such as Workbooks("date_tracking.xls").Sheets("parameters" ).Range("B" & i).Value But can't seem to figure out how to use 2 variables, 1 for row and 1 for column. strCol = "B" i = 2 Workbooks("date_tracking.xls").Sheets("parameters" ).Range(strCol & i).Value Could someone enlighten me as to my mistake and the proper synthax. Thank you, Daniel P |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range column and row using variables
Range is useful for a string input, try:
Sub daniel() rrow = 7 ccolumn = "B" Cells(rrow, ccolumn).Value = 1234 End Sub instead -- Gary''s Student - gsnu200736 "Daniel" wrote: Hello, I have been successful at using a singular variable to be used in the Range property, such as Workbooks("date_tracking.xls").Sheets("parameters" ).Range("B" & i).Value But can't seem to figure out how to use 2 variables, 1 for row and 1 for column. strCol = "B" i = 2 Workbooks("date_tracking.xls").Sheets("parameters" ).Range(strCol & i).Value Could someone enlighten me as to my mistake and the proper synthax. Thank you, Daniel P |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA Range Variables... | Excel Programming | |||
Set few range variables at once | Excel Programming | |||
Range of variables | Excel Programming | |||
Using variables in the Range command | Excel Programming | |||
Range Variables | Excel Programming |