HI,
I have recorded the following MACRO. I want to make 2 changes to it.
For all the rows similar to the 3rd Row (RANGE (''B5:G6")), I want the selection to start at B5 but end till whichever row has DATA in it. (The no. of rows with data keep on changing).
When this range will change then, the Range in the sheet in which this range is pasted "WARNINGS", should also dynamically change. So it CANNOT be RANGE "A1" Select, RANGE "A3" Select....so on
Because if there are 10 Rows OR 15 Rows ( this no. of rows will keep on changing) with data in my MASTERSHEET, then the paste should automatically take place in RANGE "A11", or "A15" Depending on the initial no. or rows pasted.
Sub Macro2()
'
' Macro2 Macro
'
Windows("MASTER SHEET 1.xlsm").Activate
Sheets("1stWarn.").Select
Range("B5:G6").Select
Selection.Copy
Windows("WARNINGS.xlsx").Activate
Range("A1").Select
ActiveSheet.Paste
Windows("MASTER SHEET 2.xlsm").Activate
Sheets("1stWarn.").Select
Sheets("1stWarn.").Name = "1stWarn."
Range("B5:G5").Select
Application.CutCopyMode = False
Selection.Copy
Windows("WARNINGS.xlsx").Activate
Range("A3").Select
ActiveSheet.Paste
Windows("MASTER SHEET 3.xlsm").Activate
Sheets("1stWarn.").Select
Sheets("1stWarn.").Name = "1stWarn."
Range("B5:G5").Select
Application.CutCopyMode = False
Selection.Copy
Windows("WARNINGS.xlsx").Activate
Range("A4").Select
ActiveSheet.Paste
Windows("MASTER SHEET 3.xlsm").Activate
Windows("MASTER SHEET 4.xlsm").Activate
Sheets("1stWarn.").Select
Sheets("1stWarn.").Name = "1stWarn."
Range("B5:G6").Select
Application.CutCopyMode = False
Selection.Copy
Windows("WARNINGS.xlsx").Activate
Range("A5").Select
ActiveSheet.Paste
Windows("MASTER SHEET 5.xlsm").Activate
Sheets("1stWarn.").Select
Sheets("1stWarn.").Name = "1stWarn."
Range("B5:G5").Select
Application.CutCopyMode = False
Selection.Copy
Windows("WARNINGS.xlsx").Activate
Range("A7").Select
ActiveSheet.Paste
Windows("MASTER SHEET 6.xlsm").Activate
Sheets("1stWarn.").Select
Range("B5:G6").Select
Application.CutCopyMode = False
Selection.Copy
Windows("WARNINGS.xlsx").Activate
Range("A8").Select
ActiveSheet.Paste
End Sub
Bookmarks