Consulting

Results 1 to 3 of 3

Thread: Multiple Offset - Insert into

  1. #1
    VBAX Mentor
    Joined
    Feb 2016
    Location
    I have lived in many places, I love to Travel
    Posts
    413
    Location

    Multiple Offset - Insert into

    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
    Cheers for your help

    dj

    'Extreme VBA Newbie in progress - one step at a time - like a tortoise's pace'


  2. #2
    VBAX Regular
    Joined
    Feb 2013
    Posts
    52
    Location
    Then rng2.Offset(, 1).Resize(, 4).Value =

  3. #3
    VBAX Mentor
    Joined
    Feb 2016
    Location
    I have lived in many places, I love to Travel
    Posts
    413
    Location
    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
    Cheers for your help

    dj

    'Extreme VBA Newbie in progress - one step at a time - like a tortoise's pace'


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •