Skip to main content

Sum if date is greater than or less than a specific date in Excel

When you need to sum cell values based on a given criteria, the SUMIF function is the best choice. In this article, we will learn how to use the SUMIF function to get the total value if date is greater than or less than a specific date in Excel.


Sum if date is greater than or less than a specific date

To sum the values if corresponding dates are greater than or less than a specific date, the SUMIF function can do you a favor, the generic syntaxes are:

Generic formula with hardcoded text:

=SUMIF(date_range,">"&DATE(year,month,day),sum_range)
  • date_range: The range of dates;
  • “>”: Indicates greater than the specific date;( A variety of logical operators can be used to your needs, such as “=”, “>”, “>=”, “<”, “<=” etc.)
  • Date(year, month, day): The DATE function combines these three different values (year, month and day numbers) and returns a valid date;
  • sum_range: The range with values that you want to sum.

Generic formula with cell reference:

=SUMIF(date_range , ">" & date_cell, sum_range)
  • date_range: The range of dates;
  • “>”: Indicates greater than the specific date;( A variety of logical operators can be used to your needs, such as “=”, “>”, “>=”, “<”, “<=” etc.)
  • date_cell: The specific date cell that you want to sum values based on;
  • sum_range: The range with values that you want to sum.

Take the above screenshot as an example, I want to add up all amount values with corresponding order dates that are greater than 10/15/2021.

Please copy or enter any one of the below formulas into a blank cell, and press Enter key to get the result:

=SUMIF($A$2:$A$12,">" &DATE(2021,10,15),$C$2:$C$12)              (Type the criteria manually)
=SUMIF($A$2:$A$12,">" &E2,$C$2:$C$12)                                       
(Use a cell reference)


Tips:

1. To sum values if corresponding dates are less than a specific date, please use the below formulas:

=SUMIF($A$2:$A$12,"<" &DATE(2021,10,15),$C$2:$C$12)             (Type the criteria manually)
=SUMIF($A$2:$A$12,"<" &E2,$C$2:$C$12)                                       
(Use a cell reference)

2. If you need to sum values that the dates are greater than or less than today’s date, you should apply the below formula:

=SUMIF($A$2:$A$12,"<"&TODAY(),$C$2:$C$12)                    (sum if less than today)
=SUMIF($A$2:$A$12,">"&TODAY(),$C$2:$C$12)                    
(sum if greater than today)

Relative function used:

  • SUMIF:
  • The SUMIF function can help to sum cells based on one criterion.

More articles:

  • Sum Values By Year In Excel
  • Supposing, you have a range of data which contains a list of dates and sale amounts, now you want to get the total amount based on given years as below screenshot shown. In Excel, the normal SUMIFS and SUMPRODUCT functions can help to solve this task quickly and easily. This tutorial will demonstrate how to use these two functions in details.

The Best Office Productivity Tools


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations