basic if calculation...(?)

zoom

New Member
Joined
Oct 27, 2002
Messages
4
hi,
i have this basic project of a class of students where i need to gather information in regards to exam results. Using an if statement i've managed to assign each student a grade (A+ to D) but now need to log the number of failures and the percentage failed in a separate cell. My guess is it involves another if statement but i'm unsure as to how i might code this. I've tried stuff like 'IF Final Result = 'D' etc but i seem to be a little way off & i'm new to excel.

thx for any replies....
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
On 2002-10-29 03:31, zoom wrote:
hi,
i have this basic project of a class of students where i need to gather information in regards to exam results. Using an if statement i've managed to assign each student a grade (A+ to D) but now need to log the number of failures and the percentage failed in a separate cell. My guess is it involves another if statement but i'm unsure as to how i might code this. I've tried stuff like 'IF Final Result = 'D' etc but i seem to be a little way off & i'm new to excel.

thx for any replies....

To get you started (this is from the Excel help file):

If AverageScore is Then return
Greater than 89 A
From 80 to 89 B
From 70 to 79 C
From 60 to 69 D
Less than 60 F


You can use the following nested IF function:

IF(AverageScore>89,"A",IF(AverageScore>79,"B",
IF(AverageScore>69,"C",IF(AverageScore>59,"D","F"))))
In the preceding example, the second IF statement is also the value_if_false argument to the first IF statement. Similarly, the third IF statement is the value_if_false argument to the second IF statement. For example, if the first logical_test (Average>89) is TRUE, "A" is returned. If the first logical_test is FALSE, the second IF statement is evaluated, and so on.
 
Upvote 0
On 2002-10-29 03:35, Chris Chattin wrote:
On 2002-10-29 03:31, zoom wrote:
hi,
i have this basic project of a class of students where i need to gather information in regards to exam results. Using an if statement i've managed to assign each student a grade (A+ to D) but now need to log the number of failures and the percentage failed in a separate cell. My guess is it involves another if statement but i'm unsure as to how i might code this. I've tried stuff like 'IF Final Result = 'D' etc but i seem to be a little way off & i'm new to excel.

thx for any replies....

To get you started (this is from the Excel help file):

If AverageScore is Then return
Greater than 89 A
From 80 to 89 B
From 70 to 79 C
From 60 to 69 D
Less than 60 F


You can use the following nested IF function:

IF(AverageScore>89,"A",IF(AverageScore>79,"B",
IF(AverageScore>69,"C",IF(AverageScore>59,"D","F"))))
In the preceding example, the second IF statement is also the value_if_false argument to the first IF statement. Similarly, the third IF statement is the value_if_false argument to the second IF statement. For example, if the first logical_test (Average>89) is TRUE, "A" is returned. If the first logical_test is FALSE, the second IF statement is evaluated, and so on.

Chris,

That is an example how to use IF. However, the task for which the formula is set up can better be done with VLOOKUP or LOOKUP...

=VLOOKUP(A1,{0,"F";60,"D";70,"C";80,"B";89,"A"},2)

or

=VLOOKUP(A1,Grades,2)

where Grades a 2-column list, consisting of

{0,"F";
60,"D";
70,"C";
80,"B";
89,"A"}

By the way,

=COUNTIF(Range,"F")

would give the number of failures. Once you have that, you can determine the percentage failed.
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,090
Members
448,944
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top