+ Start a Discussion
WC1265WC1265 

Advanced Formula Help...please

Cannot get advanced formula to validate syntex.  Need the below formula to calculate as such: If unit dose actual is less than or equal to unit dose base, multiply unit dose actual by $10.  If unit dose actual is greater than unit dose base and less than unit dose target, multiply unit dose actual by $30.  If unit dose actual is greater than or equal to unit dose target, multiply unit dose actual by $40.
 
Formula is currently written as such:

IF(Unit_Dose_Act__c <=  Unit_Dose_Base__c),Unit_Dose_Act__c*10,

IF(AND(Unit_Dose_Act__c> Unit_Dose_Base__c,Unit_Dose_Act__c<Unit_Dose_Target__c),  Unit_Dose_Act__c *30), IF(Unit_Dose_Act__c>=  Unit_Dose_Target__c),Unit_Dose_Act__c *40

 

Any help would be greatly appreciated.  Thanks!

CurtAllen.ax323CurtAllen.ax323
Try this out,  I did not change the logic in your formula, only corrected the syntax.  Let me know of any more errors.
 
Code:
IF(Unit_Dose_Act__c<=Unit_Dose_Base__c,Unit_Dose_Act__c*10,
IF(Unit_Dose_Act__c>=Unit_Dose_Target__c,Unit_Dose_Act__c *40,
IF(AND(Unit_Dose_Act__c>Unit_Dose_Base__c,Unit_Dose_Act__c<Unit_Dose_Target__c),Unit_Dose_Act__c *30)))

 
WC1265WC1265
Thanks so much!! Formula worked!  Appreciate the help.