billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Would like to apply the value of the cell in row 2 to all rows below if the adjacent column is <> blank.
This code works, however I have to repeat for the next (possible) several columns.
Any assist would be appreciated.
Initial ex.
Next ex
This code works, however I have to repeat for the next (possible) several columns.
Any assist would be appreciated.
Initial ex.
Code:
dim c as long, rng as long
Set rng = Range("E2", Range("E" & Rows.Count).End(xlUp)) For Each c In rng
If c <> "" Then
c.Offset(, 1).Value = Cells(2, 6).Value
End If
Next
Next ex
Code:
For Each d In rng If d <> "" Then
d.Offset(, 2).Value = Cells(2, 7).Value
End If
Next