This question already has an answer here:
- Filling any empty cells with the value above 5 answers
Sorry for the noobish question, but I'm new and I don't have much of a programming background. I tried this on my own for a few hours, but I just don't know enough. I checked this and this, but I couldn't figure out how to modify it enough.
Example data:
The first part is how I get the file, the 2nd part is how I want it to look.
The first 3 columns have values somewhere in the column. I need to find those values, copy them, and paste them down to the next value, then repeat all the way to the bottom of the range. Sometimes there are many values per column, sometimes only 1. The last row of the data could be determined by column 4. Basically I just need to fill in all the blank cells. Note: Row 2 does not always contain the first value.
Here's what I have so far (update):
Sub FindFillIn()
Dim columnValues As Range, i As Long
Dim cellstart As Integer
Dim cellend As Integer
cellstart = 2
cellend = ActiveSheet.Range("E" & ActiveSheet.Rows.Count).End(xlUp).Row
i = 1
For i = cellstart To cellend
If Cells(i, 1).Value = "" Then
Cells(i, 1).Value = Cells(i - 1, 1).Value
End If
Next i
End Sub
Update:
It appears to run correctly on the first column, but it only does one column. How do I get it to run on columns 1, 2, and 3?