Hi All,
I have some code here that I can't figure out.
The first code selcts 3 rows, inserts some more and then copies up the same format and clears certain areas. It does this for specific rows i.e. 31:33
The second code does the same but for only one row. This code however, is dynamic so when the rows change, it can follow down and insert the row inthe right place.
I need to combine these to so that I can select 3 rows and copy and paste and stuff but be dynamic to get it in the right place.
Any suggestions?
Sub New_Notice()
'
' New Notice Macro
Rows("31:33").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
Rows("34:36").Select
Selection.AutoFill Destination:=Rows("31:36"), Type:=xlFillDefault
Rows("31:36").Select
Range("B31:B33, C31, D31:K33").Select
Selection.ClearContents
Range("B31").Select
End Sub
Sub New_DATA()
'
' New DATA Macro
Dim rowPosition As Integer
With Worksheets("MASTER")
rowPosition = .Cells(1, 4).Value
.Rows(rowPosition).EntireRow.Select
Selection.Insert Shift:=x1Down, CopyOrigin:=xlFormatFromRightOrBelow
Rows(rowPosition + 1).Select
Selection.AutoFill Destination:=.Range(.Cells(rowPosition, 1), .Cells(rowPosition + 1, 1)).EntireRow, Type:=xlFillDefault
.Range(.Cells(rowPosition, 2), .Cells(rowPosition, 11)).ClearContents
.Cells(rowPosition, 2).Select
End With
End Sub
Bookmarks