Find Value, Copy Adjacent Cell & Paste To Corresponding Cell Of Another Found Value

  • I have found many posts similar to what I am trying to accomplish, but nothing that I have been able to modify and make work. I need a VBA script that will find a cell with the text data "Difference" and copy the adjacent (to the right) cell's data. I then need to find a cell with text data "Ops" and paste the previous data to it's adjacent cell.

    Any help is much appreciated. Thanks.


  • Re: Find Adjacent Data And Copy

    Try this:

    Sub Macro2()
        Cells.Find(What:="Difference", After:=ActiveCell, LookIn:=xlFormulas, _
            LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Offset(0, 1).Copy Destination:=Cells.Find(What:="Ops", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
            xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
            , SearchFormat:=False).Offset(0, 1)
    End Sub
  • Re: Find Adjacent Data And Copy

    Glad i could help, it can be modified to find anything you choose and paste next to anything you choose like this:


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!