Carol Rivera32 said:Hey everyone! Thanks so much for all the help, you guys are lifesavers..
I'm reaching out because I've been stuck on an Excel issue for weeks now, so if there's a kind soul out there who can take a look..
So, here's the deal:
I have 10 different subjects and, say, 200 students.
I've laid out all ten subjects in columns, and students in rows.
The thing is, not every student has to pass all ten subjects—some just need to pass five, some four, others eight or seven, and so on. Basically, each student has a specific number of subjects they are required to pass (out of my total of 10).
Whenever a student passes an exam, I enter the date they took it (using this format: 1-Jan-13) into the cell under that subject's column. Exams a student still needs to take (but is required to) are marked with: "undefined date." Subjects a student isn't required to take at all are marked as "N/A."
So, the table with 10 columns and 200 rows is full of these labels (dates, "undefined date," and "N/A"), and every student has a different number of mandatory subjects.
What I really need is a formula that calculates the percentage of passed exams (relative to the total number of exams the student is actually required to pass—meaning I want to ignore the "N/A" cells)—for each row per student.
Because, naturally, I want that percentage to update instantly every time I punch in a new date..
For example, if someone has passed three exams (three cells with dates) and still has three left to go (three cells saying "undefined date"), that means they have 6 exams total to pass, making their pass rate 50%. So, Excel needs to completely ignore those 4 cells in the row that say "N/A."
What's the easiest way to do this (ideally in just one formula)?
Does anyone know?😕
I uploaded a sample file so you can see exactly what I'm working with: http://www.sendspace.com/file/2o4wqm
Since you have fixed text for all the columns—"N/A" means they don't take it, "undefined date" means they must take it, and then there's the actual date when it's passed—you can use a formula that just checks for those specific text strings and ignores the actual dates. Here's the formula:
Code:
=((10-COUNTIF(B2:K2;"N/A"))-COUNTIF(B2:K2; "undefined date"))/(10-COUNTIF(B2:K2;"N/A"))
Personally, I'd probably use something else instead of the phrase 'undefined date'—maybe just a dash, or 'xxx,' or something short. It would make things a lot cleaner.
Basically, this formula takes the total possible exams (which is 10), subtracts the ones that aren't required ("N/A") to find how many *must* be taken, then subtracts the number of exams not yet completed to get the passed count. Finally, it divides that by the number of required exams. Just make sure the column containing the formula is formatted as a percentage.