You need to sign in to do that
Don't have an account?
Satya413
Need help creating Formula field
Hello All,
I am trying to create a formula field called 'Grade__c' with return type text. Based on the Total Marks (Total__c, return type is number), the grade field should be populated with either A+, A, B+, B, C and D. Say for example, the total marks are 600 0ut of 800, then the grade should be B. Can anyone help me out with this.
Thank you,
Satya
I am trying to create a formula field called 'Grade__c' with return type text. Based on the Total Marks (Total__c, return type is number), the grade field should be populated with either A+, A, B+, B, C and D. Say for example, the total marks are 600 0ut of 800, then the grade should be B. Can anyone help me out with this.
Thank you,
Satya
Here you go:
IF(Total__c>700,"A+",
IF(Total__c>=600),"A",
IF(Total__c>=500),"B",
IF(Total__c>=400),"C",
"D"))))
or if these is an "F"
IF( Total__c>700,"A+",
IF(Total__c>=600,"A",
IF(Total__c>=500,"B",
IF(Total__c>=400,"C",
IF(Total__c>=300,"D",
"F")))))
All Answers
what field represent 800 = Total__c?
what is the grade A+, A, B+, B, C and D percentage or ratio.
A+ =? 95%+
A =? 90%-95%
etc.
Thx
Have you tried with nested IFs?
IF(AND(Total__c<800,Total__c=>700),"A+",
IF(AND(Total__c<700,Total__c=>600),"A",
IF(AND(Total__c<600, Total__c=>500),"B+",
.....)
)
)
Field representing 600 and 800 is Total__c which is a formula field with return type of number. It calculated the sum of marks obtained from each subject. Grade__c is determined by the the total__c. Total marks between 500 and 600 is a grade B and likewise 600 to 700 is A.
Thank you,
Satya
I have tried the below formula. However it is throwing an syntax error.
IF(AND(Total__c<800,Total__c>=700),"A+",
IF(AND(Total__c<700,Total__c>=600),"A",
IF(AND(Total__c<600, Total__c>=500),"B+")
)
)
Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2
Thank you,
Satya
Here you go:
IF(Total__c>700,"A+",
IF(Total__c>=600),"A",
IF(Total__c>=500),"B",
IF(Total__c>=400),"C",
"D"))))
or if these is an "F"
IF( Total__c>700,"A+",
IF(Total__c>=600,"A",
IF(Total__c>=500,"B",
IF(Total__c>=400,"C",
IF(Total__c>=300,"D",
"F")))))
You will have to enter the missing values for all scenarios (B-, C+,C,C-,D, etc). That is why I put "...." in the end of my formula.
William's suggestion should work, but again you need to customize it based on the values you have.
Thank you both for your response. It worked. Both of u are correct and not sure which answer to mark as best .. ;)
Thank you,
Satya
As a rule of thumb, the best answer is the answer you use to solve you issue/question.
For example:
if you use:
IF(AND(Total__c<800,Total__c>=700),"A+",
IF(AND(Total__c<700,Total__c>=600),"A",
IF(AND(Total__c<600, Total__c>=500),"B+")
)
)
Then mark Satya as best answer
but if you use:
IF(Total__c>700,"A+",
IF(Total__c>=600),"A",
IF(Total__c>=500),"B",
IF(Total__c>=400),"C",
"D"))))
then mark William as best answer
In both cases, you can give a thumb up even if you can't mark both as best answer.
Thx