The TEXT() function removes thousands separators when converting currency fields to text in formulas. This article shows how to add commas back using a CASE formula.
Scenario:
For example, if a currency field contains $1,234,567, using TEXT(Amount__c) in a formula returns '1234567' without commas. This formula restores the comma separators.
The following sample formula assumes the number has a maximum of 10 digits. Please replace "*" in the formula with the API name of your target currency field.
CASE(LEN( TEXT(*) ) ,
4, LEFT( TEXT(*), 1) & "," & RIGHT( TEXT(*), 3),
5, LEFT( TEXT(*), 2) & "," & RIGHT( TEXT(*), 3),
6, LEFT( TEXT(*), 3) & "," & RIGHT( TEXT(*), 3),
7, LEFT( TEXT(*), 1) & "," & MID( TEXT(*), 2, 3) & "," & RIGHT( TEXT(*), 3) ,
8, LEFT( TEXT(*), 2) & "," & MID( TEXT(*), 3, 3) & "," & RIGHT( TEXT(*), 3),
9, LEFT( TEXT(*), 3) & "," & MID( TEXT(*), 4, 3) & "," & RIGHT( TEXT(*), 3),
10, LEFT( TEXT(*), 1) & "," & MID( TEXT(*), 2, 3) & "," &MID( TEXT(*), 5, 3) & "," & RIGHT( TEXT(*), 3),
TEXT(*))
Formula Explanation: This formula uses the CASE function to branch the process based on the number of digits in the value. For example, it first determines the number of digits of the currency field "*" with LEN( TEXT(*) ). If the number of digits is 4, it gets the first character from the left with LEFT( TEXT(*), 1), concatenates a ,, and then concatenates the three characters from the right with RIGHT( TEXT(*), 3). (e.g., 1000 → 1,000)
For numbers with 5 or more digits, it uses similar logic to adjust the position where the commas are inserted.
Please refer to the following document.
005132555

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.