# IF Calculation with Date

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### carole_chalmers

I need to create a formula that will calculate a column based on another column of dates. e.g. add c1,c2,c3 if the corresponding columns date falls within the year 2010. Any ideas??

#### OBP

This tests if column a has the year 2010 in the date, it puts a 1 if it is and a 0 if not, you can do your addition instaed of putting in the 1, just copy iy down the column.
=IF(YEAR(A1) = 2010, 1,0)

You can then sum the new column.
I expect you can also use SumIf, it has it's own Help Topic with this example
=SUMIF(A2:A5,">160000",B2:B5)

#### carole_chalmers

Ok mega I get that, thank you. Ok what about taking it a stage further so that it falls between two dates, e.g. if a date in one cell falls between two other dates take the financial year then total up some figures!!

#### OBP

If you look at the Excel help on the IF Worksheet Function it shows using IF between 2 values.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

As Seen On