Some time you stay on requirement output value is changed based on different criteria. This is achieved by formula field in Salesforce.
For example, You can be changed the Grade Level based on the Total marks.
Marks – Text Field
Level – Formula Field , return type as Number
IF( Marks__c > 450, 1 ,
IF( Marks__c > 400, 2 ,
IF( Marks__c > 350, 3 ,
IF( Marks__c > 300, 4 ,
IF( AND( Marks__c > 200, Marks__c <= 300), 5 ,0 )
)
)
)
)
Result: –
——————–We Are happy To Helping You ——————–