I am attempting to use VBA to place the following formula in a cell:
=sumif(A:A,(cell two columns to the left and one row up),C:C)
The code I'm using is:
ActiveCell.Formula = _
"=SUMIF(A:A," & Range("A" & x - 1) & ",C:C)"
This problem is that the search criteria is a date and needs "" around it. The formula I am generating at this point is:
It needs to be:
If I try to use """ in VBA, I get an error. How do you place quotation marks in a formula???