Excel: How can I get the most recent 3-month average, but not use blank months?

I don't know of a great way to average the three most recent non-blank months, but here's a very hacky way to do it. This may spark some better ways to accomplish it.

In your raw data, create a table, and then sort by month (descending) and person.

enter image description here

Next, filter on the Sales column and de-select blanks. Then copy those contents to another area and paste.

Then create a "Rank" column. Formula for cell D2, which ranks each month (most recent is 1, etc) for each person.

    =IF(B2=B1,D1+1,1)

Then have another area with your distinct people (column F), and placeholder columns for their most recent 3 months (columns labled 1, 2 and 3).

Cell G2 formula:

    =SUMIFS($C:$C,$B:$B,$F2,$D:$D,G$1)

Drag it over to column title 3 and down. Lastly, create your average formula.

enter image description here