Paul,
Coll = 2 ' column
Roww = 2 ' starting row
Do
If Cells(Roww, Coll) = "" then ' empty?
Cells(Roww, Coll) = Cells(Roww,Coll).Offset(0,-1)
' get data from cell to left
End if
Roww = Roww + 1 ' move down
Loop While Cells(Roww, Coll).Offset(0, -1) <> ""
This is untested, and I'm not sure if it's the logic you want. There are
slicker ways to do it, but this is basic.
--
Earl Kiosterud
www.smokeylake.com
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am attempting to create a macro that will allow me to survey a column
> of data and fill any empty cells with the input from the corresponding
> row of data from another column. As an example:
>
>
> Store Name Distributor Name
>
> Jiffy JIF
> Skippy SKIP
> Kraft
> Butterball BUTTER
>
> I would want my macro to insert the text "Kraft" into the third row of
> data in the distributor column. I have toyed with the following macro,
> to little success:
>
> Dim i As Integer
> Sheets("Data Mapping").Select
> For i = 1 To 104
> If Range("C & i + 7").Text = 0 Then
> Range("A & i + 7").Select
> Selection.Copy
> Range("C & i +&").Select
> ActiveSheet.Paste
> Next i
>
> (I have 104 rows of data that I want to "fill", starting in row 8).
> Any input that you might have would be most appreciated. Thanks
>