I want to say:
If EP Small is greater than 0 and date is greater than or equal to today, then say Small,
if not, if EP Micro is greater than 0 and date is greater than or equal to today, then say Micro,
if not, if EP Medium is greater than 0 and date is greater than or equal to today, then say Medium,
if not, if EP Affiliate is greater than 0 and date is greater than or equal to today, then say Affiliate,
else say blank
I keep getting incorrect perameter errors and can't work out what to do to fix them.
This is my formula:
IF(
AND(
Date__c >=TODAY(),
(IF(
EP_Small__c > 0, "Small",
IF(
EP_Micro__c > 0, "Micro",
IF(
EP_Medium__c > 0,"Medium",
IF(
EP_Affiliate__c > 0,"Affiliate", " "))))
)))
The error highlights the secon IF and says: Error: Incorrect parameter type for function 'AND()'. Expected Boolean, received Text
How do I fix this?
All help gratefully received.
7 件の回答
Try this
IF(
Date__c >= TODAY(),
IF(
EP_Small__c > 0, 'Small',
IF(
EP_Micro__c > 0, 'Micro',
IF(
EP_Medium__c > 0, 'Medium',
IF(
EP_Affiliate__c > 0, 'Affiliate',
NULL
)
)
)
),
NULL
)