I have lists of $ sale amounts in one column and then another column near it that shows if it's a "YOR" for sales or "RE" for returns and I want to sum the dollar figures of the YORs.
I have an equation that I am trying to insert into a worksheet using a macro. When you run the macro there is a cell in H16 that should fill in with the resulting total sale number
There's a variable entitled CellNumber (Long) that holds the # of items in the list. VA05NDump is the name of the worksheet with the data.
Range("H16").FormulaR1C1 = "SUMIF((VA05NDump!R2C3:VA05NDump!R"&CellNumber&"C3),"YOR",R2C13:R"&CellNumber&"C13)
when I click out of the equation in VBA it says "compile error" expected: end of statement" and highlights what is inside this bracket: ["C3),"]
I've tried changing the "YOR" to ="YOR" and "=YOR" but that doesn't change anything.
Any help would be awesome!
Thanks!