IF AND with Date

Hello,
I am trying to achieve the following:
If the date is grater than 2020,6,30 and the salespersonA is "D" and salespersonB is "T" then calculate 30% of net profit, otherwise leave the cell blank.
What I have so far is below and I have an error "#unparseabl"
=IF(AND(Date2676Β > 2020, 6, 30,Β [SalespersonA]2676Β = "D",Β [SalespersonB]2676Β = "T"),Β ([Net Profit]2676Β - 100)Β * 0.3, "")
I would greatly appreciate your help.
Thank you.
Best Answer
-
Try this...
=IF(AND(Date@row > DATE(2020, 06, 30), SalespersonA@row = "D", SalespersonB@row = "T"), ([Net Profit]2676Β - 100)Β * 0.3)
The problem is with how you entered the date. You have to use a DATE function (in bold above).
DATE(yyyy, mm, dd)
Answers
-
Try this...
=IF(AND(Date@row > DATE(2020, 06, 30), SalespersonA@row = "D", SalespersonB@row = "T"), ([Net Profit]2676Β - 100)Β * 0.3)
The problem is with how you entered the date. You have to use a DATE function (in bold above).
DATE(yyyy, mm, dd)
-
It worked!
Thank you Paul!
Help Article Resources
Categories
Check out the Formula Handbook template!