Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
Sushma Ramakrishnan

# Validation Rule for Checking Percentage Range not working

Hi All,

I have a field which should allow to enter percentage only between 0.0 and 100.0 including these values.I have tried the below and it was working too but suddenly its not working.Please Help...

OR(
Test__c >= 0.0,
Test__c <= 100.0
)

Thanks for any Help in Advance...!
Best Answer chosen by Sushma Ramakrishnan
Sushma Ramakrishnan
Hi All,

Thanks so much for your time...:)
I tried out the below and it worked out for me :
OR(
TEST__c > 1.0,
TEST__c < 0.0
)

Maharajan C
Hi Sushma,

First you check the Field data type,If the field is Percentage data type means use the below formula :  To enter percentage only between 0.0 and 100.0 including these values

OR( Test__c <= 0, Test__c >= 1)

Then you got the proper result.

Let me know if you want any further help.

If those points are help means mark these as a best answer.

Thanks,
Raj
(Sweet Potato Tec)

Sushma Ramakrishnan
Hi Maharaja,

Your formula is working but its not taking value 0.0 and 100.0.it should allo that too.

Thanks.
Sushma Ramakrishnan
Hi All,

Thanks so much for your time...:)
I tried out the below and it worked out for me :
OR(
TEST__c > 1.0,
TEST__c < 0.0
)
This was selected as the best answer
Garhing Cheung
I would suggest the following in addition to the above:

OR(
Test__c > 1.0,
Test__c <= 0.0,
ISBLANK(Test__c))
)

This would allow the User to Enter from 0.01% to 100%. Anything outside of these percentages including a blank field would fire the validation rule.

Hopefully this helps!
Rohit Gothecha 3
Hi, I would like to add on this -
The Solution for Percentage field is
if we need if from 1%-20% then the solution is
OR(
Test__c >= 0.01,
Test__c <= 0.20
)