Looping through a Range in Excel
public sub test()
dim r as range
set r = activeworksheet.range("A1")
do while not r =""
debug.print r.address
set r = r.offset(1,0)
loop
set r = nothing
end sub
Cheers,
Jason Lepack
On Apr 11, 12:45 pm, smartnhandsome wrote:
Can any one suggest a way to loop through an Excel worksheet rows till
i see a null in the contents of the cell Here is sort of pseudo code.
Start
Worksheet("sheet").cell(row,col) < ""
Worksheet("sheet").range(namedrange).value=Workshe et("sheet").range(namedrange).value
& worksheet("sheet").cell(row,col).value
end the loop
|