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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
52,137
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,))
 

Watch MrExcel Video

Forum statistics

Threads
1,089,751
Messages
5,410,230
Members
403,303
Latest member
pajg

This Week's Hot Topics

Top