Share via

Macro to insert rows below active cell

Anonymous
2018-04-16T07:27:03+00:00

Hi,

I am looking for some assistance with a basic macro. Currently, the macro keeps pasting above rows 52 in the incorrect order see yellow highlights below. Each time I run the macro it pastes the content into cell 52. I would like to adjust this so it would paste the content below the active row/cell. If anyone knows the answer I would love some assistance with this.

Current Macro below.

Sub Insert()

'

' Insert Macro

'

'

    Sheets("Sheet2").Select

    Rows("1:7").Select

    Selection.Copy

    Sheets("Buildup SOR & Costs").Select

    Rows("52:52").Select

    Selection.Insert Shift:=xlDown

    Range("A41").Select

End Sub

Thanks for your help in advance.

Regards,

Natasja

[Moved from: Office / Excel / Other/unknown / Office 2010]

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2018-04-16T08:00:35+00:00

Try this:

Sub Insert()

 '

 ' Insert Macro

 '

 '

     Sheets("Sheet2").Rows("1:7").Copy

     Sheets("Buildup SOR & Costs").Select

     Selection.Insert Shift:=xlDown

 End Sub

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2018-04-16T08:05:10+00:00

    Wow thank you so much, problem solved!

    Regards,

    Natasja

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-04-16T07:57:08+00:00

    Hi !

    I'm not an expert either but maybe you could do the lazy way and select the row under the 52 ?

    Best regards

    Pierre

    Was this answer helpful?

    0 comments No comments