Using a variable in a range().select statement??
Posted by Travis on July 31, 2001 6:48 AM
This is the start of my macro. My problem is in the last line of code. Based off the value of "CellNumber", I want to select a certain range. I need help adjusting my macro.
Sub TEST()
Dim CellNumber
Range("C2").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(PM!RC[2]:R[629]C[2],"">0"")-1"
CellNumber = "=R[1]C[2]"
Range("C4:E[CellNumber]").Select
End Sub