Forum Discussion

LisaMarie1981's avatar
LisaMarie1981
Brass Contributor
Oct 02, 2023

Sumif between dates

This is what I was trying, but getting an error.

=sumif(Table1[Net to Office],Table1[Close Date],">="&CashFlow!C2,Table1[Close Date],"<=&CashFlow!C3)

On 1 tab I have date and net to office, see below.

2023-01-04 $               3,250.00
2023-01-06 $               2,650.00
2023-01-09 $               2,950.00
2023-01-17 $               3,850.00

then on another tab I have a start date and end date. I need to sum the total revenue in above if it falls between the start and end period. So for example under Jan 1 - 7 it should total $5900 but I keep getting errors.

Start of Period1-Jan8-Jan15-Jan
End of Period7-Jan14-Jan21-Jan
 Total Revenue   

 

3 Replies

  • LisaMarie1981 

    For 2 0r more conditions, you need SUMIFS instead of SUMIF.

     

    =SUMIFS(Table1[Net to Office],Table1[Close Date],">="&CashFlow!C2,Table1[Close Date],"<=&CashFlow!C3)

    • LisaMarie1981's avatar
      LisaMarie1981
      Brass Contributor

      HansVogelaar such a small thing but makes all the difference. lol. Thank you!

       

      Now when I drag the formula over how can I make it so that net to office and close date columns don't shift with the formula, I tried putting $ in front and keep getting an error

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        LisaMarie1981 

        Like this:

         

        =SUMIFS(Table1[[Net to Office]:[Net to Office]],Table1[[Close Date]:[Close Date]],">="&CashFlow!C2,Table1[[Close Date]:[Close Date]],"<=&CashFlow!C3)

Resources