Hi all,
I'm using the following code on my sheet
The code looks in the range for blank cells. Where it finds a blank cell it then changes the value to match the same as the cell above.
This works perfectly for what I want with one exception. Each column contains the string "END" (could be anywhere in that column). Where "END" is found in that column, I would like it to then move on to the next column and *not* change all the blanks under "END" within the range, to "END".
Hopefully that makes sense
Any ideas on this one?
Thanks!
I'm using the following code on my sheet
VBA Code:
Sub FillData4()
Dim ws1 As Worksheet
Set ws1 = Worksheets(1)
For Each Cell In ws1.Range("C5:C148", Range("C5").End(xlToRight))
If Cell.Value = "" Then
Cell.Value = Cell.Offset(-1, 0).Value
End If
Next Cell
End Sub
The code looks in the range for blank cells. Where it finds a blank cell it then changes the value to match the same as the cell above.
This works perfectly for what I want with one exception. Each column contains the string "END" (could be anywhere in that column). Where "END" is found in that column, I would like it to then move on to the next column and *not* change all the blanks under "END" within the range, to "END".
Hopefully that makes sense
Any ideas on this one?
Thanks!