Get value form a cell in a loop
try this line instead
v1 = Range(st & irow).Value
you don't need the ":" for a single cell
--
Gary
"Kanga 85" wrote in message
...
I collect a variable column from a messge box:
st = InputBox("Insert column to start")
and I then want to get the value for a range of cells in this column and
subsequent work on them, all in a loop (where lastrow has been determined
elsewhere)
For irow = 2 to lastrow
v1 = (st & ":" & irow ).value
....................
Next irow
This fails as the range has too many " in it. How do I express a range
when I have the column as st (assume st ="C") and the row as irow (assume
irow=2).
Thanks,
Kanga85
|