Jump to content
Salesforce and other SMB Solutions are coming soon. ×

calculations using a number range


Recommended Posts

I am wanting to do a calculation using a number field but only want a certain range of numbers to qualify for the calculation.

Example: I have a Money field that I enter numbers into from 0 to 100,000.00 If the number (##) in the Money field is between 50,000.00 and 60,000.00 I want to multiple ## by 5 and have the result in a Sum field.

Or, if the number(##) is between 50,000.00 and 60,000.00 have it enter a 1 in the Sum field.

I am stuck on how to only pull out only the 'range' of numbers that fit my cirteria.


Thanks, confused.gif

Link to comment
Share on other sites

Assuming your Sum field is a calculation field, you could use the case statement as follows.


Sum = Case( money < 50000, "0", money >= 50000 and money <= 60000 , money * 5, "1" )

In the above, if the amount in the money field is less than 50,000, the result will be 0; if the amount is between 50,000 and 60,000 inclusive, the result will be the amount *5; if the amount is greater than 60,000, the result will be 1.


As you did not state what result you would like for those values not within the stated range, I chose to give them a value of 0 or 1 for demonstration purposes. You could certainly choose to leave them blank (see below) or apply a different formula to them.


Sum = Case( money >= 50000 and money <= 60000 , money * 5)

You can set up (almost) as many ranges and results as you would like.

Link to comment
Share on other sites

  • Create New...

Important Information

Terms of Use