D
david.vantil
I am going around in circles trying to get this macro to work. I would
like it to see if the contents of a cell match a perameter. If so I
want it to paste a copied range of data into the cell, then check the
next cell until it either reached an empty cell.
Any suggestions?
Range("$AP$2:$DZ$2").Select
Selection.Copy
Dim rg1 As Range
Set rg1 = Range("AP12")
Do Until IsEmpty(rg1)
If rg1 = "2" Then
ActiveSheet.Paste
Else
Set rg1 = rg1.Offset(1, 0)
End If
Loop
End Sub
like it to see if the contents of a cell match a perameter. If so I
want it to paste a copied range of data into the cell, then check the
next cell until it either reached an empty cell.
Any suggestions?
Range("$AP$2:$DZ$2").Select
Selection.Copy
Dim rg1 As Range
Set rg1 = Range("AP12")
Do Until IsEmpty(rg1)
If rg1 = "2" Then
ActiveSheet.Paste
Else
Set rg1 = rg1.Offset(1, 0)
End If
Loop
End Sub