Note: The other languages of the website are Google-translated. Back to English

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

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL