Share via

How to use a date range in SUMIF function?

Anonymous
2023-06-09T21:39:23+00:00

In Excel, how can I use the SUMIFS function to sum values that occur prior to a certain date. For example, with dates in b5:b15, a cutoff date in b2, and the amounts I want to sum in c5:c15, I can use =SUMIF(b5:b15,b2,c5:c15) to sum amounts that occur on the date specified in b2. But how to sum for all dates occurring before the cutoff date? =SUMIF(b5:b15,"<b2",c5:b15) does not work.

Microsoft 365 and Office | Excel | For education | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2023-06-09T22:23:58+00:00

Place the cell reference outside the quotes and concatenate it with "<". Use

=SUMIF(B5:B15,"<"&B2,C5:C15)

Was this answer helpful?

20+ people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-06-09T23:15:08+00:00

    Perfect! Thank you very much!

    Was this answer helpful?

    0 comments No comments