Ignoring Empty Cells in Multiple Formulae

Michael Shapiro

New Member
Joined
Apr 1, 2014
Messages
10
All

Each month I get a report of majors studying in my department. As we have two "concentrations" (and old and new designations for each concentration) the report is a bit complex. Further, newly admitted students who have declared their majors are shown, even though they have not yet earned grades that appear in the "institutional GPA" column.

I calculate the average GPA, as well as students above and below certain thresholds for the two concentrations, but know that the empty GPA cells are causing inaccuracies.

I think the ISNUMBER function might help me sort this out, but in addition to overall GPA, I also need to ensure that only one concentration is being factored at a time.

The current formula for all students is =SUM(GPA)/STUDENTS where GPA is all GPAs including empty cells and STUDENTS is the number of majors.

When I parse that for the "best" students, I use =COUNTIF(GPA,">3.499"), and for students at risk, I use =COUNTIF(GPA,"<2.501") and =COUNTIF(GPA,"<2.0").

I have to learn how to add in the ISNUMBER so that empty GPA cells are ignored.

It gets a bit more complex when I want to look at the concentrations, because I'm only interested in ignoring the empty GPA cells associated with one of the two concentrations.

For example, the "best" students in one concentration (remember the multiple designations) are reported using =COUNTIFS(GPA,">3.499",CONCENTRATION,"=LCJ") and =COUNTIFS(GPA,">3.499",CONCENTRATION,"=LSJ"). Again, I want to eliminate any consideration of "new" majors in this concentration who have yet to post a GPA.

I welcome your thoughts and suggestions.

Mike
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I welcome your thoughts and suggestions.

you could use an if/iferror statement wrapped around your formulas
or possibly a helper column?

its hard to know exactly whats going on without an example (for me since i'm not in finances/math fields)
 
Last edited:
Upvote 0
Blake

I've "sanitized" the report to eliminate student identifiers and can share it to give you an idea of what I'm trying to accomplish.

Mike
 
Upvote 0
yeah so where you are seeing trouble is when you have math that would include 0
so if you want to count the number of students below a certain gpa

Code:
=COUNTIF(GPA,"<2.501")

would have to exclude blanks as its counting it as 0
so your named range does not exclude these students with blank values.
I would recommend:
- Deleting those students from your named range using VBA ( and adjusting your named range accordingly)
- Get rid of the named ranges and use an error handling statement to exclude blank students.
- Use a helper column to determine which lines to interact with

so for the first option open the vba editor and insert a module by right clicking your project. Then copy/paste this code inside. Please note that after running this macro you can not undo so use this on a backup of your work.

Code:
    On Error Resume Next
    Columns("G").SpecialCells(xlBlanks).EntireRow.Delete

for the second option you can research a method but i think option 3 would be best by implementing a helper column in K5 copy this down to K678

Code:
=IF(AND(G22<>"",G22<2.5),1,IF(AND(G22<>"",G22>2.5),2,"err"))

and then in your countifs statements you can just count the number of 1's and 2's or whatever you feel like altering the code to be.

Code:
=COUNTIF(K5:K678,1)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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