This may get you started. You can modify the range as needed.
Sub Copyif()
Dim MyRange As Range
Dim MyCell As Range
Set MyRange = Range("H30:S30")
For Each MyCell In MyRange
If MyCell.Value = "A" Then
MyCell.Copy Destination:=Range(MyCell.Address) _
.Offset(6, 0)
End If
Next
End Sub
Ronbo wrote:
> I have data in cells A1..L1. I have a condition (A,B or C) in cells
> H30..S30. Cell A1 corresponds to h30, B1 to I30, etc.
>
> I need a routine that will copy and paste the data down 6 rows based up on
> the condition. So for each cell in H30..S30 that has A in it, the routine
> will then paste the value 6 rows down.
>
> Any help is appreciated.
>
> Regards
|