I have a macro that will fill rows of data that match today's date. There will always just be two rows of data that meet this criteria. I would like them to fill rows 2 and 3, because in row 4 I have formulas that will add the data in each column from rows 2 and 3.
I am currently trying to use the following to fill in my blank rows:
DestRow1 = ws2.Cells(Rows.Count, "A").End(xlUp).Row + 1
DestRow2 = ws2.Cells(Rows.Count, "B").End(xlUp).Row + 1
DestRow3 = ws2.Cells(Rows.Count, "C").End(xlUp).Row + 1
DestRow4 = ws2.Cells(Rows.Count, "D").End(xlUp).Row + 1
DestRow5 = ws2.Cells(Rows.Count, "E").End(xlUp).Row + 1
DestRow6 = ws2.Cells(Rows.Count, "F").End(xlUp).Row + 1
DestRow7 = ws2.Cells(Rows.Count, "G").End(xlUp).Row + 1
DestRow8 = ws2.Cells(Rows.Count, "H").End(xlUp).Row + 1
DestRow9 = ws2.Cells(Rows.Count, "I").End(xlUp).Row + 1
DestRow10 = ws2.Cells(Rows.Count, "J").End(xlUp).Row + 1
DestRow11 = ws2.Cells(Rows.Count, "K").End(xlUp).Row + 1
DestRow12 = ws2.Cells(Rows.Count, "L").End(xlUp).Row + 1
The problem is that it places the new rows directly below the row that has my prepopulated formulas, thus leaving the two rows above still blank.
Is there any other code I could use to fill in the two blank rows?
I am currently trying to use the following to fill in my blank rows:
DestRow1 = ws2.Cells(Rows.Count, "A").End(xlUp).Row + 1
DestRow2 = ws2.Cells(Rows.Count, "B").End(xlUp).Row + 1
DestRow3 = ws2.Cells(Rows.Count, "C").End(xlUp).Row + 1
DestRow4 = ws2.Cells(Rows.Count, "D").End(xlUp).Row + 1
DestRow5 = ws2.Cells(Rows.Count, "E").End(xlUp).Row + 1
DestRow6 = ws2.Cells(Rows.Count, "F").End(xlUp).Row + 1
DestRow7 = ws2.Cells(Rows.Count, "G").End(xlUp).Row + 1
DestRow8 = ws2.Cells(Rows.Count, "H").End(xlUp).Row + 1
DestRow9 = ws2.Cells(Rows.Count, "I").End(xlUp).Row + 1
DestRow10 = ws2.Cells(Rows.Count, "J").End(xlUp).Row + 1
DestRow11 = ws2.Cells(Rows.Count, "K").End(xlUp).Row + 1
DestRow12 = ws2.Cells(Rows.Count, "L").End(xlUp).Row + 1
The problem is that it places the new rows directly below the row that has my prepopulated formulas, thus leaving the two rows above still blank.
Is there any other code I could use to fill in the two blank rows?