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.
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
52,066
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,089,236
Messages
5,407,061
Members
403,120
Latest member
trpkumar

This Week's Hot Topics

Top