Okay, what I'm trying to do.
Need to be able to run a loop that checks contents of cells or lack thereof.
That's the easy part.
My problem comes from the fact that I have to have the macro start at A1 and work down the column from there, with A1 and an unspecified number of cells below it empty before I reach the first "live" cell. Once I reach that cell, everything is fine.
macro Code:
Sub dataFill() Sub dataFill() Dim strIs, strFill As String Dim i As Integer i = rngCount() Range("A1").Select Do While i <> 0 strIs = ActiveCell.Value If strIs = "" Then ' if ActiveCell position is A1 then ' ActiveCell.Offset(1,0).select ' i=i-1 ' else ' strFill = ActiveCell.Offset(-1,0).value ' ActiveCell.Value=strFill ' ActiveCell.Offset(1,0).select ' i=i-1 ' end if Else ActiveCell.Offset(1, 0).Select i = i - 1 End If Loop End Sub




Reply With Quote