function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
suji srinivasansuji srinivasan 

If statement range -conditional action in formulas

how to perform the following action in formulas ? 

IF( AND(Cost_to_company_Annual__c >=250000 , Cost_to_company_Annual__c <500000),
"(Cost_to_company_Annual__c-250000)*5",'zero')

Thanks in advance
Best Answer chosen by suji srinivasan
mukesh guptamukesh gupta
Please use below code:-
 
IF( AND(Cost_to_company_Annual__c >=250000 , Cost_to_company_Annual__c <500000),
(Cost_to_company_Annual__c-250000)*5,0)

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

All Answers

mukesh guptamukesh gupta
Hi Suji,

What should output for this formula?
and what data type of this formula field?
suji srinivasansuji srinivasan
Required output datatype is Number
mukesh guptamukesh gupta
Please use below code:-
 
IF( AND(Cost_to_company_Annual__c >=250000 , Cost_to_company_Annual__c <500000),
(Cost_to_company_Annual__c-250000)*5,0)

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
This was selected as the best answer