Finding if a cell has 7 in it… [Pattern matching in Excel]

Imagine you work at MI5 as a HR officer. You want to find all agents who have license to kill (licence 7). Your data looks like above.

How would you go about it? 

If you filter the list or use FIND() or SEARCH() formulas, you will end up with agents who also have licenses 77, 17 or not7. So how would you solve this problem?

Of course, you do what any smart person does. You summon Excel and ask it nicely by using some wicked pattern matching logic.

CP026: All about Excel !@#$%^+/*(}][<

In the 26th session of Chandoo.org podcast, let’s learn all about Excel !@#$%^+/*(}][<.

I am talking about Excel operators, you silly.

What is in this session?

Do you know Excel has more than 25 operators? That is right. There are a variety of operators beyond the simple + – * and /.

In this podcast, let’s understand all about these operators and how to use them. You will learn,

  • Why there is a gap between last & this podcast session
  • About Excel operators
  • Arithmetic operators
  • Text operators
  • Reference operators
  • Comparison operators
  • Closing thoughts

Find first non-blank item in a list with formulas

Blank cells are an invisible pain in the analysis. Dealing with them is frustrating, time consuming and often very complex. At chandoo.org, we are not big fans of blank cells. That is why we wrote:

Today, lets talk about one more scenario. Lets say you want to find out the first non-blank item in a list. How would you do it?

Can you find that pattern? [Homework]

Are you ready for an Excel challenge?

Today, your job is very simple. Just find a pattern in a text and return corresponding value.

Your Homework:

In a range we have some resource types & their billing rates.

In another range, we have some descriptions. Each description contains a resource type somewhere inside it. We need to retrieve billing rate for each description by looking up which resource type is mentioned in it.

See above diagram.

Even faster ways to Extract file name from path [quick tip]

The best thing about Excel is that you can do the same thing in several ways. Our yesterdays problem – Extracting file name from full path is no different. There are many different ways to do it, apart from writing a formula. Learn these techniques to be a data extraction ninja.

1. Using find replace
2. Using text to columns
3. Using UDFs