#1   Report Post  
Junior Member
 
Posts: 3
Default IF functions

I am trying to work out a fomular for calculating college grades, i have found the formular for if all grades are the same as in the 1st line below.

trying to get formular for the examples in 2 to 4 which are causing problems. any ideas?

A B C D E

1 P P P P = Pass =IF(AND(A10="p",B10="p",C10="p"),"Pass")

2 P M M M = Pass

3 D M P M = Pass

4 M D D M = Merit

greatful for this formular

tomo
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Philip J Smith
 
Posts: n/a
Default IF functions

Hi Tomo.

Please supply a list of the rules to apply to each set of results.

"tomo" wrote:


I am trying to work out a fomular for calculating college grades, i have
found the formular for if all grades are the same as in the 1st line
below.

trying to get formular for the examples in 2 to 4 which are causing
problems. any ideas?

A B C D E

1 P P P P = Pass
=IF(AND(A10="p",B10="p",C10="p"),"Pass")

2 P M M M = Pass

3 D M P M = Pass

4 M D D M = Merit

greatful for this formular

tomo


--
tomo

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Philip J Smith
 
Posts: n/a
Default IF functions

Try

=IF(COUNTIF(A1:D1,"P")0,"Pass",IF(COUNTIF(A1:D1," M")0,"Merit","Distinction"))

See earlier post on rules. This formula assumes

1 Any incidence of a "P" in a set of results gives a maximum grade of a
"pass"
2. If there are no passes but there is a minimum of one "M" in a set of
results then the overall result is a "Merit".
3 If there are no P's or M's then the overall result must be a "D"
(Distinction).

Another initial check might include a test for a blank cell or an invalid
entry.

{=IF(ISNA(MATCH(A1:D1,ValidGrades,0)),"Invalid
Entry",IF(COUNTIF(A1:D1,"P")0,"Pass",IF(COUNTIF(A 1:D1,"M")0,"Merit","Distinction")))}

This is an array formula so you will need to press [ctrl][shift] and [Enter]
to enter the formula in the cell.

ValidGrades is a named range containing the set {P,M,D}

Regards

Phil


"tomo" wrote:


I am trying to work out a fomular for calculating college grades, i have
found the formular for if all grades are the same as in the 1st line
below.

trying to get formular for the examples in 2 to 4 which are causing
problems. any ideas?

A B C D E

1 P P P P = Pass
=IF(AND(A10="p",B10="p",C10="p"),"Pass")

2 P M M M = Pass

3 D M P M = Pass

4 M D D M = Merit

greatful for this formular

tomo


--
tomo

  #4   Report Post  
Junior Member
 
Posts: 3
Smile

Philip


Thanks for the help. starting with your formular and spending 5 mins adapting it i finaly got it working. The formular below is the final version which works

=IF(COUNTIF(A14:C14,"p"),"Pass",IF(COUNTIF(A14:C14 ,"m"),"Merit",IF(COUNTIF(A14:C14,"d"),"Distinction ")))

Thanks

regards

Tomo



Quote:
Originally Posted by Philip J Smith
Try

=IF(COUNTIF(A1:D1,"P")0,"Pass",IF(COUNTIF(A1:D1,"M ")0,"Merit","Distinction"))

See earlier post on rules. This formula assumes

1 Any incidence of a "P" in a set of results gives a maximum grade of a
"pass"
2. If there are no passes but there is a minimum of one "M" in a set of
results then the overall result is a "Merit".
3 If there are no P's or M's then the overall result must be a "D"
(Distinction).

Another initial check might include a test for a blank cell or an invalid
entry.

{=IF(ISNA(MATCH(A1:D1,ValidGrades,0)),"Invalid
Entry",IF(COUNTIF(A1:D1,"P")0,"Pass",IF(COUNTIF(A1 :D1,"M")0,"Merit","Distinction")))}

This is an array formula so you will need to press [ctrl][shift] and [Enter]
to enter the formula in the cell.

ValidGrades is a named range containing the set {P,M,D}

Regards

Phil


"tomo" wrote:


I am trying to work out a fomular for calculating college grades, i have
found the formular for if all grades are the same as in the 1st line
below.

trying to get formular for the examples in 2 to 4 which are causing
problems. any ideas?

A B C D E

1 P P P P = Pass
=IF(AND(A10="p",B10="p",C10="p"),"Pass")

2 P M M M = Pass

3 D M P M = Pass

4 M D D M = Merit

greatful for this formular

tomo


--
tomo
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I get Excel to determine the line curve formula without graph. Cadelima Excel Discussion (Misc queries) 8 December 20th 05 09:57 PM
User-defined functions created in Excel 2000 fail in Excel 2003 goodguy Excel Discussion (Misc queries) 1 October 3rd 05 07:04 PM
Database functions should use criteria in formula, as 1-2-3 does 123user Excel Worksheet Functions 8 September 29th 05 08:57 PM
Visible rows and functions that work tracy Excel Worksheet Functions 2 August 19th 05 05:25 AM
3 questions about automated c++ com add-in worksheet functions gert Excel Worksheet Functions 0 March 10th 05 09:57 AM


All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"