So you don't care where the value is stored in the array?
[tt]
Dim aConn()
ReDim aConn(8)
r = 1
For i = LBound(aConn, 1) To UBound(aConn, 1)
aConn(i) = Cells(r, 1).Value
r = r + 1
Next
iCnt = UBound(aConn, 1)
For i = LBound(aConn, 1) To UBound(aConn, 1)
If aConn(i) = "" Then
For j = UBound(aConn, 1) To LBound(aConn, 1) Step -1
If aConn(j) <> "" Then
aConn(i) = aConn(j)
iCnt = iCnt - 1
Exit For
End If
Next
End If
Next
ReDim Preserve aConn(iCnt)
For i = LBound(aConn, 1) To UBound(aConn, 1)
ActiveCell = aConn(i)
ActiveCell.Offset(1, 0).Select
Next
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.