1

I need to alter this formula to include a text field (The text field displays a number)

IF((ISPICKVAL(Louvre_Calculator__c, "215mm Louvre Calculator")),
(Pivot_mm__c - 4)-(**2*60**), 
(Pivot_mm__c - 4)
)

I want to change the 2*60 with the output of field infill_profile_size__c. Infill_profile_size__c is a formula field that spits out either 40 or 60 but is displaying as a text field and is causing the IF statement to error.

Thanks

3

Use VALUE(infill_profile_size__c) to convert TEXT to NUMBER

IF((ISPICKVAL(Louvre_Calculator__c, "215mm Louvre Calculator")),
(Pivot_mm__c - 4)-(2*VALUE(infill_profile_size__c)), 
(Pivot_mm__c - 4)
)
1

You can use the VALUE function to convert text to a number:

IF(ISPICKVAL(Louvre_Calculator__c, "215mm Louvre Calculator"),
  (Pivot_mm__c - 4)-(2*VALUE(infill_profile_size__c)), 
  (Pivot_mm__c - 4))

Coincidentally, you can make this formula a bit smaller:

(Pivot_mm__c - 4)-(2*
  IF(ISPICKVAL(Louvre_Calculator__c, "215mm Louvre Calculator"),
  VALUE(infill_profile_size__c), 0))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.