=IF(AND(YEAR($A$1)=YEAR(A4),MONTH($A$1)=12),C4,IF(AND(YEAR($A$1)=YEAR(A4),OR(MONTH($A$1)=MONTH(A4),MONTH($A$1)-1=MONTH(A4),MONTH($A$1)-2=MONTH(A4))),C4,0))

looks at A1 and pulls the last 3 months, A1 will always be a month end

Brenner, I've just been looking over your question again after having some additional thoughts on formula refinement and noticed your description and formula don't match.

December in A1 will return any month in A4 as a match.
The rest of the formula will only allow for current year, Jan date in A4 will only give Jan results, Feb will only give Jan & Feb, to pull the results from Nov / Dec of previous year as appropriate using the current approach would need allowance for year variation, and you would need something like 1-2=11 to be a true result.
Maybe I'm missing something only seeing a small part of your bigger picture, but thought the pointer might be of use in case you hadn't realised.

For a true floating 3 month period you could use

=ISNUMBER(MATCH($A$1,EOMONTH(A4,{0,1,2}),0))*C4

Analysing your second formula, (this is based purely on assumptions and theory) do you realy need to refer to the entire range?

Assuming that column K is relative to the rest of the data, the biggest range this eventually covers is SUM(C4:C15), could the countif part be limited to that range from the start or would it miss other relevant records in the table?

=IF(AND(MONTH($A$1+1)=MONTH(A4),YEAR($A$1)=YEAR(A4)),(SUM(C4:INDEX(C4:C15,MIN(COUNTIF(K4:K15,K4),12),0))),0)

If that's not going to work for your dataset then maybe some trickery to induce part-time recalculation on the heavy formula, assess this suggestion first to see if it might casue other issues.

In excel options enable iterative calculation.

in U4

=IF($A$2,IF(AND(MONTH($A$1+1)=MONTH(A4),YEAR($A$1)=YEAR(A4)),(SUM(C4:INDEX($C4:C$10584,MIN(COUNTIF($K4:K$10584,K4),12),0))),0),U4)

You will get a circular reference warning, click cancel and fill the formula down the column as needed, everything should now show 0

Now Enter 1 in A2, wait for the sheet to calculate, and clear the 1 from the cell.

This allows you to calculate the heavy formula manually while retaining automatic calculation on the rest.

Hopefully something there is of use.