I need help with the following diagnosis and a modification to an existing formula.

Here is the table I am working with:

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |

1 | Upgrade 1 | Upgrade 2 | Upgrade 3 | # employees | # months | Oct | Nov | Dec | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep |

2 | May | 3 | 3 |

<tbody>

</tbody>

In my OP, the logic I needed solved was - if any cell in F2:Q2 = cell (A2:C2)-E2, then =D2.

This was the formula that was provided, which works great but I ran into an issue - SUMPRODUCT((MONTH($F41:$H41)=MONTH(EOMONTH(L$40,($K41+1))))*$J41))

Here is my problem...if I have no data in cells A2:C2, then cell P2=9... and let's say I enter a month into A2, then P2=6. Why is that happening?

And secondly, I also need the formula to show the number of employees I need for each month leading up to the upgrade month.

Thanks!