This is my first blog post of 2017. I have to say I do love the energy of a new year. My favourite time of the year are those days between the “two Christmases” i.e. 25th December and 6th January. There is no pressure. Just movies to be watched, sweets to be eaten, walks to be taken and generally relaxing all around. So I was looking back over my posts and I realised that I had no blog post specifically for filtering – which is probably one of the features you use most in Excel.

In a previous post I have covered how to set up a list and I’ve devoted a big chunk of Chapter Two of my book (Your Excel Survival Kit)  to it.

But here I am just going to focus specifically on the mechanics of filtering. So what is filtering? If you have a list in Excel the chances are you are not going to spend your day reading through it from the beginning to the end. If you are, could I suggest that maybe you have just a little too much time on your hands…. No, usually you will need to be able to find specific pieces of information out of it. The best way to do that is via filters. So how do they work?

I am using a file called products_filter which you can download to practise on.

(You can download the file, by doing a right click on it, and then click on Save As, and then choose where you want it saved to)

Let’s say I want to answer 5 questions from this data set.

  1. How many of the products are Black?
  2. How many have a List Price over 1000
  3. How many have a Color of Blue and have Sport in the Product Name
  4. How many started (ScdStartDate) after 1998 and have a ListPrice between 50 and 100
  5. How many Product Models have Mountain in the name, have a color of Black or Silver (NOT Black/Silver) and have a list price of over 1000.

In this video I show you how to do these filters, clear down the list after each one and also how you know if there is a filter applied.

Video 1 – How many of the products are Black?

[fvplayer src=”https://s3-eu-west-1.amazonaws.com/the-excel-expert/Filter_Q1_Black.mp4″]

Video 2 – How many have a List Price over 1000

[fvplayer src=”https://s3-eu-west-1.amazonaws.com/the-excel-expert/Filter_Q2_List_Price_over_1000.mp4″]

Video 3 – How many have a Color of Blue and have Sport in the ProductName

[fvplayer src=”https://s3-eu-west-1.amazonaws.com/the-excel-expert/Filter_Q3_Blue_Sport.mp4″]

Video 4 – How many started (ScdStartDate) after 1998 and have a ListPrice between 50 and 100

[fvplayer src=”https://s3-eu-west-1.amazonaws.com/the-excel-expert/Filter_Q4_StartDate_ListPriceV02.mp4″]

Video 5 – How many Product Models have Mountain in the name, have a color of Black or Silver (NOT Black/Silver) and have a list price of over 1000.

[fvplayer src=”https://s3-eu-west-1.amazonaws.com/the-excel-expert/Filter_Q5_Mountain_BlackOrSilver_List_Price.mp4″]

Homework

(Use the same file)

  1. Identify how many of the products are blue? (28 – check bottom left hand corner)
  2. Identify how many products have a list price of less than 500 (hint: check number filters for Less than) (202 – again check bottom left hand corner of screen)
  3. Identify how many products have Road in the ProductName and have a Cost of less than 500 (22 – again check bottom left hand corner)
  4. Identify how many started in 2007 and 2006 (tick both boxes) and have a Cost between 250 and 500 (50 – again check bottom left hand corner)
  5. Identify how many products with a product code that starts with FW and a SCDStartDate in 2006 and a list price greater than or equal to 100 (5 – again check answer in bottom right hand corner)