1

Here is the formula I am using:

"$" & IF( 
  Lease_PB_Total_Price__c >= 1000000, 
  TEXT(FLOOR( Lease_PB_Total_Price__c  / 1000000)) & ",", 
  "") & 
IF( 
  Lease_PB_Total_Price__c >= 1000, 
  RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",", 
  "") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) & "." &

IF( 
  MOD(Lease_PB_Total_Price__c , 1) * 100 < 10, 
  "0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100), 
  TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99)) 
)

Here is the result:

$30,628.00

I want to lose the ".00"

I tried rounding but do not think I can round with text?

Please help and thanks!

​Shannon

2 Answers 2

1

I am assuming your formula is of type "Number". If so, edit your formula, under "Formula Options", choose "0" in the "Decimal Numbers" picklist.

That should do it!

2
  • Nope. Text field
    – ShannonA
    Commented Apr 14, 2016 at 15:53
  • Can this be changed to a numeric, or even better, currency formula? Commented Apr 14, 2016 at 17:44
0

Here you go:

"$" & IF( 
  Lease_PB_Total_Price__c >= 1000000, 
  TEXT(FLOOR( Lease_PB_Total_Price__c  / 1000000)) & ",", 
  "") & 
IF( 
  Lease_PB_Total_Price__c >= 1000, 
  RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",", 
  "") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3)

You could use RIGHT(TEXT(ROUND(Lease_PB_Total_Price__c,0)), 3) to round cents 49c or less => $0, 50c and more => $1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .