Trying to save multiple ranges to a variable.
When I try to use a variable of the saved ranges, I get #VALUE!
Any suggestions how to fix what I am doing wrong?
VBA Code:
Sub WorkingTest()
'
With Range("B10:B19", "C10:C19")
.Value = Evaluate("Row(" & .Address & ") - 9") ' Prints 1 thru 10 in each range
End With
End Sub
When I try to use a variable of the saved ranges, I get #VALUE!
VBA Code:
Sub NotWorking()
'
String1 = "B10:B19"
String2 = "C10:C19"
String3 = String1 & ", " & String2
'
With Range(String3)
.Value = Evaluate("Row(" & .Address & ") - 9")
End With
End Sub
Any suggestions how to fix what I am doing wrong?