Help creating a Macro

Closed
NanduB Posts 1 Registration date Tuesday 24 July 2018 Status Member Last seen 24 July 2018 - 24 Jul 2018 à 13:00
 Blocked Profile - 24 Jul 2018 à 16:29
Hi,

I am trying to create a Macro to copy paste the particular range of row in the same sheet based on the cell value in the previous sheet

Scenario Description:

In sheet2 I have to copy the rows from A13 : 20 based on the list of values in Column S in Sheet1

1 response

Blocked Profile
24 Jul 2018 à 16:29
You shouldn't need help making a macro, you can literally RECORD ONE! Press record Macro, and do the job, then press stop. There you go, a macro!

It should look like this:

Sub Macro1()
'
' Macro1 Macro
'

'
Sheets.Add After:=ActiveSheet
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "thissheet"
Sheets("Sheet1").Select
Rows("2:12").Select
Selection.Copy
Sheets("thissheet").Select
Rows("6:6").Select
ActiveSheet.Paste
End Sub



After you have recorded it, then you can start to introduce the variables!