IF statement based on date

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
167
Hi guys and girls....

I am trying to see if there is a formula without having to use several boxes to work around it that gives me an "answer" depending on the input date/year.

These are the cells I am trying to populate/use.

C9 = date
F9 = a number (changeable number)
F10 = fixed number
G9 = the formula I want. If it is a date in 2019 then it I want it to do a sum of F9+F10. If its a date in 2020, then returns 0.

Hopes it helpful, and thanks in advance.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,847
Office Version
365
Platform
Windows
Try:
Code:
=IF(YEAR(C9)=2019,F9+F10,0)
 
Last edited:

PCL

Well-known Member
Joined
Jul 15, 2008
Messages
1,348
Try
=IF(YEAR(C9)=2019,F9+F10,IF(YEAR(C9)=2020,0,))
 

Forum statistics

Threads
1,086,146
Messages
5,388,101
Members
402,102
Latest member
davidmel20

Some videos you may like

This Week's Hot Topics

Top