Excel - Perform a calculation based on a date

Calculations based on a date can be done in Excel worksheets including sums and differences. The data can be passed as a parameter in the date format to the SUMIF operator. The current date or a specific date can be passed to the SUMIF operator along with the cell references in Excel office software. Calculations based on a date can simplify the management of data in worksheets which might otherwise have to be done by complicated methods such as writing programs or macros. The support for date data format in the Excel worksheet is a very useful feature of the office software.


I'm trying to calculate 2 columns if the date is more recent than 2009:

in Column A Column B Column C     
5/31/2009 75 35     
6/30/2009 40 20     
12/2/2010 20 10 

I need to take Column B minus Column C if the date is older than 2009. Can someone please provide me the right formula to use?


I was able to figure it out. Here's the formula:


Note that

Thanks to joanie for this tip on the forum.
Published by aakai1056. Latest update on May 21, 2012 at 09:03 AM by aakai1056.
This document, titled "Excel - Perform a calculation based on a date," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
Using Logical Formulas in Excel
Excel - Rows and Columns RC - 7