aerodynamix
New Member
- Joined
- Sep 27, 2002
- Messages
- 1
Have a macro to fill blank cells with data from above:
Public Sub CopyDown()
LastRow = Range("A65536").End(xlUp).Row
For i = 1 To LastRow
If Range("A" & i).Value = "" Then
Range("A" & i - 1 & ":CB" & i - 1).Copy Destination:=Range("A" & i)
End if
Next i
End Sub
The problem lies when the cell contains something other than a date or integer. If for example the cell contains "=====" I want to replace it with the date or integer above.
Public Sub CopyDown()
LastRow = Range("A65536").End(xlUp).Row
For i = 1 To LastRow
If Range("A" & i).Value = "" Then
Range("A" & i - 1 & ":CB" & i - 1).Copy Destination:=Range("A" & i)
End if
Next i
End Sub
The problem lies when the cell contains something other than a date or integer. If for example the cell contains "=====" I want to replace it with the date or integer above.