Works nicely, Stephen. Thank you.
Before I close this, I hope you can help me with one other item. I don't require this, but if I had wanted it, how would I add from C4 to LastRow to the SUMIF formula?
I am confused with where the quotations go. I have left the quotations that you so helpfully added in your answer. Thank you.
--Perry
Dim LastRow As Integer
LastRow = Range("A" & Rows.Count).End(xlUp).Row
SumCriteria = RngCell.Offset(-1, 2).Value
RngCell.Offset(0, 9).Formula = "=SumIf(($C4:$C & LastRow)," & SumCriteria & ",J4:J & LastRow)"

Originally Posted by
spitfireblue
You need to do it like this:
SumIfCriteria = RngCell.Offset(-1, 2).Value
RngCell.Formula = "=SumIf($C4:$C50," & SumIfCriteria & ",J4:J50)"
Note: I am not sure if you want to use SumCriteria or SumIfCriteria?
Note: I also removed the extra brackets that were not required.
Bookmarks