Hi everyone,
I'm using this macro to find the next open cell in column G and paste the formula within. It works perfectly, however, I want to add the next step which would drag this formula through the entire range (stop when column A no longer has any data in it). Would someone be able to help me with this?
Sub PasteFormula()
Sheets("Viewpoint - BLog-P&P").Cells(Rows.Count, "G").End(xlUp).Offset(1). _
Value = "=SUMIFS('Revenue Spread'!$K$8:$K$3000,'Revenue Spread'!$C$8:$C$3000,""Promised/Probable"",'Revenue Spread'!$H$8:$H$3000,INDIRECT(""D""&ROW()))+SUMIFS('Revenue Spread'!$L$8:$L$3000,'Revenue Spread'!$C$8:$C$3000,""Promised/Probable"",'Revenue Spread'!$H$8:$H$3000,INDIRECT(""D""&ROW()))"
End Sub
I'm using this macro to find the next open cell in column G and paste the formula within. It works perfectly, however, I want to add the next step which would drag this formula through the entire range (stop when column A no longer has any data in it). Would someone be able to help me with this?
Sub PasteFormula()
Sheets("Viewpoint - BLog-P&P").Cells(Rows.Count, "G").End(xlUp).Offset(1). _
Value = "=SUMIFS('Revenue Spread'!$K$8:$K$3000,'Revenue Spread'!$C$8:$C$3000,""Promised/Probable"",'Revenue Spread'!$H$8:$H$3000,INDIRECT(""D""&ROW()))+SUMIFS('Revenue Spread'!$L$8:$L$3000,'Revenue Spread'!$C$8:$C$3000,""Promised/Probable"",'Revenue Spread'!$H$8:$H$3000,INDIRECT(""D""&ROW()))"
End Sub