# Sumif between dates

Copper Contributor

# 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 Period 1-Jan 8-Jan 15-Jan End of Period 7-Jan 14-Jan 21-Jan Total Revenue
3 Replies

# Re: Sumif between dates

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)

# Re: Sumif between dates

@Hans Vogelaar 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

# Re: Sumif between dates

Like this:

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