Hello Everyone,

I'm having trouble putting a formula together in VBA. Here is the formula code as it currently stands:

Range("D10").Formula = "=SUMIF('Sheet1'!A$5:A$" & LastRow - 1 & ",""January"",'Sheet1'!C$5:C$" & LastRow - 1 & ")+SUMIF('Sheet1'!A$5:A$" & LastRow - 1 & ",""February"",'Sheet1'!C$5:C$" & LastRow - 1 & ")+SUMIF('Sheet1'!A$5:A$" & LastRow - 1 & ",""March"",'Sheet1'!C$5:C$" & LastRow - 1 & ")"
As you can see, it is very long because I'm not sure how to put this together as an array in VBA. What I'd like the code to say is that if A5 through LastRow is "January", "February", or "March", then I would like the sum of column C for those lines. I've tried the formula below and all sorts of SUM/SUMIF/SUMIFS/OR statements and I havent been able to find something that works.

Range("D10").Formula = "=SUMIF('Sheet1'!A$5:A$" & LastRow - 1 & ",{""January"",""February"",""March""},'Sheet1'!C$5:C$" & LastRow - 1 & "
Thanks!