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
Synthia B.Synthia B. 

Formulas

How do you create formulas similar to the excel formulas listed below in Salesforce?

Excel Example
KevinBrKevinBr
I am not sure how you got $183,501.00 from 29.24 * 6275, but here goes the pseudo logic:

decimal monthlyBilledCharge = 0.00;
decimal adjusted_PEPM = 29.24;
decimal PEPM_Fee = 9.61;
integer totMembers = 16128;
integer totEmployees = 6275;
string feeType = 'PEPM';

if (feeType == 'PMPM') {
  monthlyBilledCharge = totMembers * adjusted_PEPM;
} else {
  monthlyBilledCharge = totEmployees * adjusted_PEPM;
}

system.debug('----Monthly Billed Charge: $' + monthlyBilledCharge);

 
KevinBrKevinBr
Result:
----Monthly Billed Charge: $183481.00