So I'm running a loop to grab data from one column on a different sheet and I want it to stop once the data in the column ends, but I'm having some trouble finding a condition to end the loop.
Do While values(i) <> 0
Set xcell = Range(Cells(x + 3, 2), Cells(x + 3, 2))
Set ycell = Range(Cells(y + 3, 2), Cells(y + 3, 2))
x = x + 1
y = y + 1
ycell.Formula = "='\\Drcs8570168\shasad\[CR Status.xlsx]Sheet1'!" & xcell.Address
values(i + 1) = xcell.Value
i = i + 1
Loop
I tried to assign each cell to a variable with an array and run the loop until blank cells start to be recorded. It tells me that the subscript is out of range.