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
Rick SF AdminRick SF Admin 

Rounding Values in a Formula Field

I have a custom object with a custom currency field called Revenue__c where users enter the exact dollar amount (i.e. $23,187,098.88). I trying to create a formula field called Rev__c that I will display the values from the Revenue__c field rounded to a specified number.

For Example:
IF (Revenue__c) =  $23,187,098.88  THEN (Rev__c) = "$23.2M" - nearest 100,000

IF (Revenue__c) =  $3,187,098.88  THEN (Rev__c) = "$3.2M" - nearest 100,000

IF (Revenue__c) =  $318,700  THEN (Rev__c) = "$0.32M" - nearest 10,000

IF (Revenue__c) =  $87,098  THEN (Rev__c) = "$0.087M" - nearest 1,000
Best Answer chosen by Rick SF Admin
Raj VakatiRaj Vakati
Use this formula.