J
JBoyer
I set up the following Marco:
Sub InsertFiveRows()
Dim LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Range("AU1:BF5").Copy Cells(LastRow, "A")
End Sub
I also want it to adjust some of the cells that were shifted down five cells
to accomadate the new cells into the formula. These are the ones that need to
be adjusted:
Cell B47 currently has the formula =COUNTA(B2:B46)
Cell C47 currently has the formula
=IF(SUMIF(E2:E46,">0",C2:C46)>0,SUMIF(E2:E46,">0",C2:C46),"")
Cell D47 currently has the formula =IF(C47<>"",E47/C47,"")
Cell E47 currently has the formula =IF(SUM(E2:E46)>0,SUM(E2:E46),"")
All of these cells need to accomadate 5 newly added rows. Hope you can help!
Sub InsertFiveRows()
Dim LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Range("AU1:BF5").Copy Cells(LastRow, "A")
End Sub
I also want it to adjust some of the cells that were shifted down five cells
to accomadate the new cells into the formula. These are the ones that need to
be adjusted:
Cell B47 currently has the formula =COUNTA(B2:B46)
Cell C47 currently has the formula
=IF(SUMIF(E2:E46,">0",C2:C46)>0,SUMIF(E2:E46,">0",C2:C46),"")
Cell D47 currently has the formula =IF(C47<>"",E47/C47,"")
Cell E47 currently has the formula =IF(SUM(E2:E46)>0,SUM(E2:E46),"")
All of these cells need to accomadate 5 newly added rows. Hope you can help!