New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using the Advanced Filter for complex multiple-field criteria

From: Managing and Analyzing Data in Excel 2010

Video: Using the Advanced Filter for complex multiple-field criteria

When you're trying to use filtering on multiple columns involving multiple criteria, the standard filter just doesn't work some of the time. We need to use an advanced filter. Suppose in the data here comprised of about 700 rows, we need to see people from a certain department who are full time and we also want to see people from another department who are half- time. And you can imagine some other combinations like that. What we need to do is set up a criteria range, so let's highlight the first six rows, put this above the data, insert, and simply copy the top row here, holding down the Control key drag this upward.

Using the Advanced Filter for complex multiple-field criteria

When you're trying to use filtering on multiple columns involving multiple criteria, the standard filter just doesn't work some of the time. We need to use an advanced filter. Suppose in the data here comprised of about 700 rows, we need to see people from a certain department who are full time and we also want to see people from another department who are half- time. And you can imagine some other combinations like that. What we need to do is set up a criteria range, so let's highlight the first six rows, put this above the data, insert, and simply copy the top row here, holding down the Control key drag this upward.

Let's just pick some departments here, for example ADC. Rather than typing this, I am just going to copy this up here. We would like to see out of the ADC department, the full time people. There are two of them. Once again to save myself some typing here, something with the Ctrl key I am going to drag this here. We are also interested in getting and seeing people from the Engineering/ Maintenance group. So once again saving ourselves some typing, holding down the Ctrl key. This. And here we are interested in seeing from that group the half-time people, so I will just copy this.

As a criteria range, this list here first of all does ignore columns D and E. If we use the Advanced Filter on the data, starting at row 7, what we are saying in English is let's see all records where the department is ADC and Full Time, in other words that combination together, or if we have got a combination of Engineering/Maintenance and Half-Time. That's what this criteria range means. So clicking anywhere in the data, using the Advanced Filter, here is our list range, totally accurate, criteria range, click here, scroll upward, select just these cells here.

So the ADC Full-Time people, Engineering/ Maintenance Half-Time people. Click OK. Any record we see here meets the two criteria, either this combination or this combination. So another way to read this is as we read left to right we are using the word And, those who were in the Department ADC and whose status is Full-Time, or those people in Engineering/ Maintenance who are Half-Time.

And you can imagine different combinations here. And you can come up with almost any kind of combination imaginable, the more you work with these. Now, if were to put Engineering/ Maintenance here and this were the criteria range, that would be very unusual and highly unlikely what it would mean is let's see all records where we either have a combination of these two criteria or anybody who's Half-Time or anybody who's Engineering/Maintenance. So even it wouldn't do that probably, it's doable and if you're familiar with the Access query grid, this would help because you understand in a same kind of way that's done.

But there's another use for an advanced filter to not quite so obvious. And that's, for example, if we wanted to use a function on one of our fields. For example suppose we wanted to find all the people hired on Monday. I think if I that were a sale day perhaps it would be more pertinent. How would we come up with this kind of construction? And there's no standard way to do this otherwise. The following formula is our starting point. Equal and I'm going to type in here g8. What does that mean? That's the first cell in the list that has a higher date in it. We are not seeing it currently because the other filter is in place unless we use it here. =g8.

Now we want to find out if these people were hired on Monday. You would need to know that here's a function called weekday and if the weekday of g8, meaning the first cell that has a date, =2. If you are familiar with the weekday function, 1 is Sunday, 2 is Monday etc. Now, to make this a little more readable let's go into our data and clear the filter, bring back all the data. So here is the data. And the reason this says false right here is the literally that very first entry there is not a Monday.

I don't care what it is really, but it's not a Monday. Now here is what we are about to do. We are going to use the Advanced Filter and use these two cells as the criteria range. Now without any knowledge of why this doesn't work, I'm going to remove this word here and we must do this, this phrase, Hire Date. This will be the criteria range and we will see just the people hired on Mondays. So with the active cell within our data, we use the Advanced Filter.

The criteria range is not what it had been. It is now going to be just these two cells and this will not work if you leave data in cell G1, so that has to go. And here is the criterion that we put in earlier and click OK. And there are 112 of these records. These are all Mondays. You could do a quick test on one of these simply by typing equal weekday, left parenthesis. Click on one of these dates. The answer will be 2, because its a Monday and that's a Monday also and so on.

So pretty far away from being intuitive. I have never even come close to calling at that, but another use of the Advanced Filter for unusual situations which you cannot get to with the regular filter.

Show transcript

This video is part of

Image for Managing and Analyzing Data in Excel 2010
Managing and Analyzing Data in Excel 2010

27 video lessons · 21882 viewers

Dennis Taylor
Author

 
Expand all | Collapse all
  1. 1m 32s
    1. Welcome
      54s
    2. Using the exercise files
      38s
  2. 25m 18s
    1. Sorting from the Sort menu
      4m 37s
    2. Sorting from the toolbar
      4m 2s
    3. Multi-key sorting
      3m 4s
    4. Sorting based on the order of data in custom lists
      4m 44s
    5. Sorting by color font, color background, or icon
      3m 57s
    6. Sorting columns
      2m 11s
    7. Sorting data in random order
      2m 43s
  3. 19m 1s
    1. Using single- and multiple-column text filtering
      5m 8s
    2. Taking a look at special numeric filters
      1m 54s
    3. Harnessing special date filters
      2m 5s
    4. Creating a top-ten list by value or percent
      3m 11s
    5. Creating custom filters
      1m 40s
    6. Copying and sorting filtered lists
      3m 7s
    7. Recognizing the limitations of standard filtering
      1m 56s
  4. 11m 16s
    1. Setting up subtotals
      4m 20s
    2. Creating multiple levels and copying subtotals
      6m 56s
  5. 13m 22s
    1. Using the Advanced Filter for complex OR criteria
      4m 30s
    2. Using the Advanced Filter for complex multiple-field criteria
      5m 37s
    3. Using the Advanced Filter to create unique lists from repeating field data
      3m 15s
  6. 10m 44s
    1. Using the Remove Duplicates command
      2m 30s
    2. Using a specialized array formula to identify data that's been duplicated
      5m 10s
    3. Using an array formula to count the number of unique items in a list
      3m 4s
  7. 10m 31s
    1. Using SUMIF, COUNTIF, and related functions for quick data analysis
      6m 48s
    2. Using database functions like DSUM, DAVERAGE, and DMAX
      3m 43s
  8. 34s
    1. Next steps
      34s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.