# Ignoring Empty Cells in Multiple Formulae

#### Michael Shapiro

##### New Member
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

#### BlakeSkate

##### Well-known Member
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:

#### Michael Shapiro

##### New Member
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

#### BlakeSkate

##### Well-known Member
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
thats fine here is a list of methods of sharing data on mr excel

#### BlakeSkate

##### Well-known Member
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)``

1,081,860
Messages
5,361,737
Members
400,653
Latest member

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...