Find sellected cell, and copy row to?

RagingR12

New Member
Joined
Sep 17, 2018
Messages
18
I want to do the following:

I want to select a cell in sheet 1:
Find that cell contant in sheet 2
Copy that row.

Find sheet 1 cell contant in sheet 3
Pate row from sheet 2

Correct row numbering in column A on sheet 3

Go back to sheet 1

I have the following example, but can't automated!

Code:
Sub copy_row()'
' copy_row Macro

    Range("F783").Select
    Selection.Copy
    Sheets("OldBom").Select
    Cells.Find(What:="1111 222 33333", After:=ActiveCell, LookIn:=xlFormulas _
        , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
    Rows("391:391").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("NewBom").Select
    Cells.FindNext(After:=ActiveCell).Activate
    Rows("394:394").Select
    ActiveSheet.Paste
    Range("A392:A393").Select
    Application.CutCopyMode = False
    Selection.AutoFill Destination:=Range("A392:A412")
    Range("A392:A412").Select
    Sheets("Datasheet v1").Select
    Range("F783").Select
    ActiveCell.Offset(395, 6).Range("A1").Select
    Sheets("OldBom").Select
    ActiveCell.Offset(0, 5).Columns("A:A").EntireColumn.Select
    ActiveCell.Offset(-17, 5).Range("A1").Activate
End Sub
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,222,828
Messages
6,168,484
Members
452,193
Latest member
Arlochorim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top