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
Ganesh RajputGanesh Rajput 

Error in formula field Decimal to currency

Hello Experts, 
I have to create a formula field which accepts a Decimal number and return currency format(Include comma and decimal points )
I got a solution from the below link:

https://hub.appirio.com/tech-blog/displaying-currencies-in-a-sfdc-formula-field-or-visualforce

but getting error " Missing ")" "

at Bold text in a formula ("0")


formula:

IF(
  someCurrencyField__c >= 1000000,
  TEXT(FLOOR(someCurrencyField__c / 1000000)) & ",",
  "") &
IF(
  someCurrencyField__c >= 1000,
  RIGHT(TEXT(FLOOR(someCurrencyField__c / 1000)), 3) & ",",
  "") &
RIGHT(TEXT(FLOOR(someCurrencyField__c)), 3) & "." &
IF(
  MOD(someCurrencyField__c , 1) * 100
  "0" & TEXT(ROUND(MOD(someCurrencyField__c , 1), 2) * 100),
  TEXT(MIN(ROUND(MOD(someCurrencyField__c , 1), 2) * 100, 99))
)

please anyone can highlight what is wrong with this formula?

Thank you..!
Best Answer chosen by Ganesh Rajput
Ganesh RajputGanesh Rajput
IF(
  someCurrencyField__c >= 1000000,
  TEXT(FLOOR(someCurrencyField__c / 1000000)) & ",",
  "") &
IF(
  someCurrencyField__c >= 1000,
  RIGHT(TEXT(FLOOR(someCurrencyField__c / 1000)), 3) & ",",
  "") &
RIGHT(TEXT(FLOOR(someCurrencyField__c )), 3) & "." & LEFT(TEXT( MOD(someCurrencyField__c , 1) * 100),2)