View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default 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