PDA

View Full Version : [SOLVED:] Multiple Offset - Insert into



dj44
11-04-2017, 08:13 AM
folks goodday,

i would like to enter into my offsets.

But i am trying to insert into multiple offsets at same time eg

cells in E,F,G,H






Sub insertoffset()

Dim rng1 As Range
Dim rng2 As Range


Set rng1 = ActiveSheet.Range("D6:D106")

For Each rng2 In rng1

If InStr(1, oCell.Value, "[EMPTY]") > 0 Then rng2.Offset(, 1).Value = "[EMPTY]" " Cells E,F,G,H

End If
End If
Next

End Sub



im not sure if i need a loop of some sort

NoSparks
11-04-2017, 09:05 AM
Then rng2.Offset(, 1).Resize(, 4).Value =

dj44
11-04-2017, 10:29 AM
Thank you,

:)




Sub insertoffset()


Dim oCell As Range


For Each oCell In ActiveSheet.Range("A1:A46")

If InStr(1, oCell.Value, "EMPTY") > 0 Then

oCell.Offset(, 1).Resize(, 4).Value = "EMPTY"


End If
Next

End Sub



that did the trick