Spreadsheet: 834687d1687988138-how-can-i-write-the-formula-to-obtain-the-correct-answer-shown-in-the-example-provided-insurance-expenditures-example
Sheet: Sheet1

 | Choose A Month From Below | LIFE INSURANCE POLICY's      YEAR - |  | 2023 |  |  |  |  |  |  | Month | Person |  | Months | People
 |  |  | AMOUNT SPENT YEAR TO DATE  ----> |  |  | Monthly Budgeted Amount | 113.41 |  |  |  | March | (Husband) |  | January | (Husband)
 |  |  | AVERAGE MONTHLY  COST ----> |  |  |  |  |  |  |  |  |  |  | February | (Wife)
 |  |  | Amount Paid Current Month Month  ----> |  |  |  |  |  |  |  |  |  |  | March | Individual #3
 | 2023-01-01 00:00:00 | <----------------------Cost During Selected Month-----------------------> |  |  |  | Actual Amt Spent in January |  | Husband |  |  |  |  |  | April
 | DATE | NAME | DETAIL / DESCRIPTION / INFORMATION | AMOUNT |  |  |  |  |  |  |  |  |  | May
 | 2023-01-17 00:00:00 | (Husband) | TRANSAMERICA INSPAYMENT                Personal Policy $75,000             Policy #2 | 168.41 |  |  |  |  |  |  |  |  |  | June
 | 2023-01-17 00:00:00 | (Wife) | TRANSAMERICA INSPAYMENT                Personal Policy $100,000           Policy #1 | 78.93 |  |  |  |  |  |  |  |  |  | July
 | 2023-02-06 00:00:00 | (Husband) | APG Personal Policy             $150,000 Policy #4 Minnissota Life             ($135.00)        PD Quarterly! | 135 |  | Need assistance wrting a formula that will look at the entire list and provide a number amount for a given month.  The above example would be for January. In the case of February the total should show 203.41.. The formula is looking at B5 but should be looking at the column B7:B24.. Reason being the calculation has to be done 12 times once for each month to fill 12 cloumns. |  |  |  |  |  |  |  | August
 | 2023-02-06 00:00:00 | (Wife) | APG Personal Policy             $100,000 Policy #3 Minnissota Life              ($30.00)        PD Quarterly! | 15 |  |  |  |  |  |  |  |  |  | September
 | 2023-02-16 00:00:00 | (Husband) | TRANSAMERICA INSPAYMENT                Personal Policy $75,000             Policy #2 | 68.41 |  |  |  |  |  |  |  |  |  | October
 | 2023-02-16 00:00:00 | (Wife) | TRANSAMERICA INSPAYMENT                Personal Policy $100,000          Policy #1 | 78.93 |  |  |  |  |  |  |  |  |  | November
 | 2023-03-06 00:00:00 | Individual #3 | Kristins Life Insurance ( comes out quarterly ) | 26.58 |  |  |  |  |  |  |  |  |  | December
 | 2023-03-16 00:00:00 | (Husband) | TRANSAMERICA INSPAYMENT                Personal Policy $75,000             Policy #2 | 68.41
 | 2023-03-16 00:00:00 | (Wife) | TRANSAMERICA INSPAYMENT                Personal Policy $100,000          Policy #1 | 78.93
 | 2023-04-14 00:00:00 | (Husband) | TRANSAMERICA INSPAYMENT                Personal Policy $75,000             Policy #2 | 68.41
 | 2023-04-14 00:00:00 | (Wife) | TRANSAMERICA INSPAYMENT                Personal Policy $100,000          Policy #1 | 78.93
 | 2023-05-04 00:00:00 | (Husband) | APG Personal Policy             $150,000 Policy #4 Minnissota Life             ($135.00)        PD Quarterly! | 135
 | 2023-05-16 00:00:00 | (Wife) | TRANSAMERICA INSPAYMENT                Personal Policy $100,000           Policy #1 | 78.93 |  | Monthly Budgeted Amount | 113.41
 | 2023-05-16 00:00:00 | (Husband) | TRANSAMERICA INSPAYMENT                Personal Policy $75,000             Policy #2 | 68.41
 | 2023-06-05 00:00:00 | Individual #3 | Kristins Life Insurance ( comes out quarterly ) | 26.58
 | 2023-06-15 00:00:00 | (Wife) | TRANSAMERICA INSPAYMENT                Personal Policy $100,000          Policy #1 | 78.93 |  | Actual Amt Spent in February |  | Husband
 | 2023-06-15 00:00:00 | (Husband) | TRANSAMERICA INSPAYMENT                Personal Policy $75,000             Policy #2 | 68.41
 |  |  |  | 0
 |  |  |  |  |  | Month Name | Total
 | [NAME]:E24,B7:B24,">"&EOMONTH(B5,-1),B7:B24,"<="&EOMONTH(B5,0),C7:C24,"*"&I5&"*") |  |  |  |  | March | 68.41
 | The above formula looks at the wrong data to obtain the answer. It must look at the entire column B7:B24 to obtain a total
 | The above variation provide an eronious answer
 | The above variation doesn't include the $135.00