ExcelNoob222
Board Regular
- Joined
- Jun 17, 2020
- Messages
- 77
- Office Version
- 365
- Platform
- Windows
Hi all,
I need to put a formula in the last column of a specific row and then I need that formula to be dragged down to the last row. However I am stuck. I currently have the code:
This will find the last column in Row 2 and place the formula there. But how do I then get that formula to drag all the way down? Thanks!
I need to put a formula in the last column of a specific row and then I need that formula to be dragged down to the last row. However I am stuck. I currently have the code:
VBA Code:
LastRow = Range("A" & Rows.Count).End(xlUp).Row
Rows(2).Find("*", , xlValues, , xlByColumns, xlPrevious).Offset(, 1).Formula = "=SUMIFS($R$4:$R$9,$O$4:$O$9,A2)"
This will find the last column in Row 2 and place the formula there. But how do I then get that formula to drag all the way down? Thanks!