Number of students with low grades

tirion

New Member
Joined
Jun 10, 2006
Messages
11
I would like to count the number of students with low grades (F), and how many of them have 1, 2, 3 or more of these.
The problem is - there could be one student with, for example three F's, but he is stll counting as only one student.
Let's say I have 22 students total (their names in ROWS) and the names of the 14 subjects (in COLUMNS).
Any suggestions?
 
Yes, that's it! So to sum up (for picture above):

For all students with low grades:
=SUM(IF(MMULT(--(B2:J17=1),TRANSPOSE(COLUMN(B2:J17)^0)),1))

For students with 3 or more low grades:
=SUM(IF(MMULT(--(B2:J17=1),TRANSPOSE(COLUMN(B2:J17)^0))>=3,1))

For students with 2 low grades:
=SUM(IF(MMULT(--(B2:J17=1),TRANSPOSE(COLUMN(B2:J17)^0))=2,1))

This was a big problem for me. You've saved me a lot of time.
Thank you once again.

tirion
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Yes, that's it! So to sum up (for picture above):

For all students with low grades:
=SUM(IF(MMULT(--(B2:J17=1),TRANSPOSE(COLUMN(B2:J17)^0)),1))

For students with 3 or more low grades:
=SUM(IF(MMULT(--(B2:J17=1),TRANSPOSE(COLUMN(B2:J17)^0))>=3,1))

For students with 2 low grades:
=SUM(IF(MMULT(--(B2:J17=1),TRANSPOSE(COLUMN(B2:J17)^0))=2,1))

This was a big problem for me. You've saved me a lot of time.
Thank you once again.

tirion

You're very welcome!

Cheers!
 
Upvote 0
You folks are making this way too complicated.

Option 1: Add a column that counts the number of 1s. Once you have that the rest is trivial.

Option 2: Reorganize your data into a format consistent with that for a relatinal database. Then, use various XL tools like a PivotTable or treat the data as a source for the appropriate SQL query.

Option 2 might seem complicated but option 1 is trivial. In K2 enter the formula =COUNTIF(B2:J2,1) and copy it as far down as necessary. Now, use COUNTIF(K2:K{n},x) to find the number of people with different conditions. Replace x with 2 to find the number of students with 2 1s or use ">=3" to find those with 3 or more 1s.
 
Upvote 0
You folks are making this way too complicated.

Option 1: Add a column that counts the number of 1s. Once you have that the rest is trivial.

Option 2: Reorganize your data into a format consistent with that for a relatinal database. Then, use various XL tools like a PivotTable or treat the data as a source for the appropriate SQL query.

Option 2 might seem complicated but option 1 is trivial. In K2 enter the formula =COUNTIF(B2:J2,1) and copy it as far down as necessary. Now, use COUNTIF(K2:K{n},x) to find the number of people with different conditions. Replace x with 2 to find the number of students with 2 1s or use ">=3" to find those with 3 or more 1s.

Agreed. Using a helper column is easier and usually more efficient. The problem, though, not every one likes them... :biggrin:
 
Upvote 0
You folks are making this way too complicated.

Option 1: Add a column that counts the number of 1s. Once you have that the rest is trivial.

Option 2: Reorganize your data into a format consistent with that for a relatinal database. Then, use various XL tools like a PivotTable or treat the data as a source for the appropriate SQL query.

Option 2 might seem complicated but option 1 is trivial. In K2 enter the formula =COUNTIF(B2:J2,1) and copy it as far down as necessary. Now, use COUNTIF(K2:K{n},x) to find the number of people with different conditions. Replace x with 2 to find the number of students with 2 1s or use ">=3" to find those with 3 or more 1s.

Agreed. Using a helper column is easier and usually more efficient. The problem, though, not every one likes them... :biggrin:



I agree with Domenic.
 
Upvote 0
Hi Tirion,

I think this would be trivial with the data structure improved. Put the data in three columns, Student, Subject & Grade. Can you do that?

Then any formulae or pivot tables or query tables or MS Access reports are simple.

(Otherwise, insert another column to do the counting. OK? )

regards,
Fazza
 
Upvote 0
This is not meant as commentary on the OP but if someone has a problem with simplicity why should anyone invest resources providing them with help? Other than the fact that overly complicated formulas (a) are intellectually interesting, and (b) make the "experts" feel superior?

Array formulas are a very powerful capability but using them at the drop of a hat to "save a column" is far from an appropriate use of them.

You folks are making this way too complicated.

Option 1: Add a column that counts the number of 1s. Once you have that the rest is trivial.

Option 2: Reorganize your data into a format consistent with that for a relatinal database. Then, use various XL tools like a PivotTable or treat the data as a source for the appropriate SQL query.

Option 2 might seem complicated but option 1 is trivial. In K2 enter the formula =COUNTIF(B2:J2,1) and copy it as far down as necessary. Now, use COUNTIF(K2:K{n},x) to find the number of people with different conditions. Replace x with 2 to find the number of students with 2 1s or use ">=3" to find those with 3 or more 1s.

Agreed. Using a helper column is easier and usually more efficient. The problem, though, not every one likes them... :biggrin:
 
Upvote 0
Sorry for covering the same matters as you Tushar. I hadn't refreshed within Explorer for a while so didn't know you'd already posted along similar lines.

Inappropriate solutions are sometimes posted. I can only imagine how much worse this could become with the next, more powerful, version of Excel.

regards,
Fazza
 
Upvote 0
This is not meant as commentary on the OP but if someone has a problem with simplicity why should anyone invest resources providing them with help? Other than the fact that overly complicated formulas (a) are intellectually interesting, and (b) make the "experts" feel superior?

Array formulas are a very powerful capability but using them at the drop of a hat to "save a column" is far from an appropriate use of them.

I don't think it's a matter of people have a problem with simplicity. But rather, other issues coming into play, such as aesthetics, available space, boss, etc. In the end, it's up to the user to determine which method best suits their needs. :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,513
Messages
6,125,262
Members
449,219
Latest member
daynle

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