You are here:

Excel/averageif does not contain

Advertisement


Question
Hi, wondering if you can answer the following for me. I have an Excel 2007 sheet into which I export information from my Customer Services helpdesk. The columns in this, therefore, contain various bits of information, one of which is a column for Reason (the reason for the Customer Services case)(Column O). I have another column, which counts the number of days a case has been open for (column AT), and another column that has the department that the customer services issue relates to (for example "Sales")(which is column K).

I need a formula so that I can find the average number of days open (data from column AT), but only for rows that relate to a specific department (data from column K) and only for which the Reason is NOT "credits" (data from column O).

I tried doing an averageif NOT function, but i can't get it to work.

Does your magical mind have any ideas?

Answer
Well, you could make another column that's based on those criteria and will either contain the VALUE or BLANK if the criteria are met. For example:

=IF(AND(K1="Department Name",O1<>"credits",AT,"")

So now this new column will have either the value from AT (number of days) or will be blank "" if the criteria is/is not met.

Now just average up the values in that column, and that should do what you want.

Let me know if you have any other questions or comments.

Also, be sure to visit my web site and watch my FREE 90-minute MICROSOFT EXCEL VIDEO TUTORIAL. Go to http://www.599cd.com/Excel/AllExperts


Cordially,

Richard Rost
599CD Computer Training
http://www.599cd.com

P.S. Also, don't forget to visit my FREE Microsoft Excel Tips & Tricks Page at http://www.599cd.com/Tips/AllExperts

P.P.S. I volunteer my time at AllExperts to help people, and I get a LOT of questions, so I can't take an hour to answer each question. If you need more DETAILED HELP, come to my TechHelp web site at http://www.599cd.com/TechHelp/AllExperts and I'll take as much time as you need to answer your question.

Out of work? Know someone who is? Get a FREE copy of my Computer Job Skills CD at http://www.599cd.com/JobSkills?key=AllExperts
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

All Answers

Answers by Expert:


Ask Experts

Volunteer


Richard Rost

Expertise

I am happy to answer any questions about Microsoft Excel. If you have an Excel problem, let me help you with it. Also, please be sure to check the Microsoft Excel Tips & Tricks and Microsoft Excel Tutorials sections of my web site.

Experience

I have been using Microsoft Excel since the very early Windows 3.1 versions. I have been teaching Microsoft Excel in the classroom since 1994, and online through computer tutorials since 2002.

Organizations
I have been volunteering on AllExperts in the categories of Microsoft Access, Visual Basic, and Weight Loss for years.

Publications
I have created a line of computer tutorials online at www.ExcelLearningZone.com and www.599CD.com/Excel.

Education/Credentials
Personally, I am self taught. I've learned everything I know from books and trial & error. If I don't know the answer, I know how to find it.

Past/Present Clients
I have over 20,000 happy clients worldwide.

©2009 About.com, a part of The New York Times Company. All rights reserved.