I saw Deb’s “lookup formula challenge” in her newsletter. Get Deb’s Excel file **here** or **here** (FN0052). Click **here** to see the solutions listed below.

We want to see which **Customer** text value is found inside each **Imported Data** text value.

‘Joe & Co’ is found inside of cell D2 so **Code** ‘JOE001**‘** goes into cell E2. *The assumption is that all of the text values in column D have one and only one match. More on this later on!*

I thought that I would create a video to explain her solution and maybe create a solution of my own. **Little did I know how much I would learn from the amazing online Excel team.**

In this **video** (apologies for the low volume) I explained Deb’s formula:

**=INDEX($B$2:$B$4,MATCH(1,IFERROR(SEARCH(“*”&$A$2:$A$4&”*”,D2,1),0),0))**

I also created and explained how my formula works:

**=INDEX($B$2:$B$4,MIN(IF(ISNUMBER(SEARCH($A$2:$A$4,D2)),ROW($A$2:$A$4)-ROW($A$2)+1,””)))**

Deb’s solution is really interesting due to the wildcards *****. My formula is dangerous if no matches are found as it defaults to the first answer! See ‘Bill Szysz Words of Wisdom’ below.

Within a few hours **Ankur Shukla** responded with this comment:

I hadn’t even considered using the LOOKUP function. Video 00169 explains this amazing solution!

And then **Bill Szysz** adds his double match formula! I’ve never seen this approach before!

Later on pmsocho shared his INDEX MATCH COUNTIF solution! Watch his video **here** (in Polish).

This **video** explains Ankur’s solution. It uses the SEARCH function but the LOOKUP function can handle arrays without ‘Ctrl’ ‘Shift’ ‘Enter’. Also, **his formula is fast and short!** The downside? The **binning trick must be explained carefully**.

XLarium commented with his alternative lookup: =LOOKUP(9^99,SEARCH($A$2:$A$4,D2),$B$2:$B$4)

Bill’s array formula uses the INDEX function, two MATCH functions and wildcards. The last MATCH function is using 0 for exact match. **The * (asterisks) do the magic!** Watch it **here**.

My **video** includes a comparison of the various solutions.

Remember the original assumption? Each ‘Imported Data’ text value will have one and only one ‘Customer’ found inside of it. **What if there’s more than one found?**

As Bill mentions, if there are multiple matches the **LOOKUP** solution returns the last matching value. The **MATCH** solutions return the first value found. This is a very important distinction!

Bill’s comment led me to this question: *What if there’s nothing found?*

All solutions (except mine) return an error if nothing is found. In my solution if nothing is found the false part of the array is activated. Index function converts “” (blank) to zero which returns the first value (cell B2).

I later changed the “” to 999999 so that it returns an error not a default answer. **If you want a default answer then maybe my solution isn’t so bad after all** (you could also wrap the other solutions with IFERROR and type a default answer).

Jonathan’s question is very important! Imagine a data set with 200000 rows. Compex/slow formulas can easily cause Excel to freeze and crash.

Thanks to pmsocho for timing the solutions! With 3000 rows of data, Ankur’s LOOKUP solution takes 0.01 seconds!

- msdn.microsoft.com/en-us/vba/excel-vba/articles/excel-improving-calcuation-performance
- msdn.microsoft.com/en-us/vba/excel-vba/articles/excel-performance-and-limit-improve
- https://fastexcel.wordpress.com/

Thanks to Debra Dalgleish for the formula challenge! It’s interesting that the challenge was named “Lookup Formula Challenge” and Ankur’s LOOKUP based formula was the fastest and shortest solution!

Thanks to everyone who participated: **Debra Dalgleish**, **Ankur Shukla**, **Bill Szysz**, **Piotr Majcher**, **rockguitarist8907**, **learnexcel**, **XLarium**, **Jonathan Cooper**, **Oz du Soleil**, **Leila Gharani**, **Gerson – Minhas Planilhas**, **Dixon Peer**.

I’ve been working with data since 2001. It’s my career and also a hobby! When I’m not playing around with data, playing chess or doodling I’m probably watching Netflix with Cali & Fenton.

]]>

According to a** article in the New Yorker** (July 31, 2017), Mr Groot had designed a font called Calibri approximately 15 years ago. Years later, **this font was playing an integral part of a political corruption scandal in Pakistan**. Part of the case involved a document that used the Calibri font. **The controversy was that one side claimed that the font did not exist at the time that the document was created. This scandal became known as “fontgate”**. Fontgate? Good grief….but it really happened.

About 15 years ago, almost exactly when Mr Groot was working on his Calibri font, I had an interesting Excel request.

Hey Kevin. I want to compare various fonts at the same time to see which one looks the best. Can Excel do this?

Wow! This was an interesting request. **The request came from someone who is as obsessed with fonts as I am with Excel**. Yes, that is a S E R I O U S font lover! For me, I would just copy/paste the text and change the font manually, but **could I make some kind of a tool in Excel?**

I remember that it was a Thursday and I stayed up almost the entire night to work on this challenge. Once I got started I couldn’t stop! So there you go….an article from the New Yorker, that I finally got around to reading today, reminded me of my ‘Text Formatter’ Excel creation from the early 2000s.

This is my Excel userform that allows you to select and compare different fonts. Yeah I know….**it might not be pretty but it works!** Imagine a proud kid coming home from grade 1 with a picture for mommy & daddy. This is what I felt like so be kind with your comments! Just smile and say “Oh, that’s lovely!”. It was one of my first VBA projects and it was fun.

Sheet ‘SampleText’ shows how to open the userform:

- Select a cell with text
- Press the ‘Click here to open….’ button

**Favorite Format: Set Default** (top left orange area)

- Use the drop down to select desired font
- The check boxes toggle bold and italic
- The drop down list changes the font size

**Synchronize**** Preview Option Details** (pink area)

- Select options and see how the ‘Preview Options: Modify Details’ section becomes synced!

**Preview Options: Modify Details** (grey area)

- Use the drop downs to select fonts.
- The check boxes toggle bold and italic
- The drop down lists change the font sizes
- Click orange ‘Fav’ button to load favorite (that’s selected in top left)

**Select Preview Option & Update** (top right purple area)

- Use the drop down to select a formatted value from grey area
- Press ‘Update Active Cell’ to put this formatted value back into the original cell

**This was all about practicing vba but where is the vba?** Go to the ‘Developer’ tab (if you don’t see it a quick google search will show you how to enable it), click on ‘Visual Basic’, and then **snoop around to see how it works!** Look at ‘UserForm1’. You can see the object and the code behind it (select it and then right click it). **Think of additional features and make the modifications!**

Please note that you might have to click ‘Enable Macros’ (after opening the file) and also run macro “ListFonts” to create a list of the fonts that you have installed in Excel. Go to Developer/Macros and then select “ListFonts’ to run it.

You can take VBA courses for years and never really learn VBA unless you build something. **Think of something that interests you and build it**. Back then I built several models using VBA. Some had a practical purpose and some did not but either way I learned a lot.

You can download the file **here** or from my **Onedrive** (filename is “**Kevins Font Formatter.xlsm**“)

My name is Kevin Lehrbass. I live in Markham, Ontario, Canada. I’ve been studying, supporting, building, troubleshooting, teaching and dreaming in Excel since 2001. I’m a Data Analyst at McKinsey & Company.

** There are so many amazing things that you can do with this powerful software**. Check out my

Away from Excel I enjoy learning Spanish, playing Chess, hanging out with Cali and Fenton and watching Excel videos

]]>

Data is normalized when each column is a separate piece of information (i.e. column A is ‘Name’, column B is ‘Sales’, etc) and each row is a record or transaction (a row could potentially be an employee or a sales transaction).

It’s often best to normalize because Pivot Tables require this structure as do most formulas. However, we aren’t always building a long term efficient solution. Sometimes we are just answering a quick question and we may never use the data-set again.

Let’s take a look at three examples of non-normalized data and the questions that we have to answer.

We need to add numbers for each Department & Year combination only when the word “total” appears in the header text of each pivoted block of data (there are many of these).

In the pic below, we would ignore the values from the 1st block of data and include the data from the 2nd block as the word “total” is found above the data.

Get the average for ‘Sales’ and ‘Profit’ for Herman and George (data-set is wider making it challenging to do manually).

This one is a bit different. The data is normalized but the totals are included in the data (last item in each sorted group). How can we extract the last item?

Modeloff champion Diarmuid Early reminded me of this technique several months ago.

In the summary table seen below, we can use this formula in cell E2 **=SUMIFS(E13:E651,$D13:$D651,$D2,$F$10:$F$648,”Total”)** and then drag it to the right and down.

Leave the formula ranges locked and unlocked exactly the way they are for it to work! It only works because the department and year values are in the exact same order in each mini table.

This formula solution **=SUMIF($B$4:$Q$6,$B12,C$4:R$6)** is similar. Note how columns C and R will slide over when dragged to the right! When the formula is dragged down only the row reference changes ($B12 becomes $B13).

And finally we have (at least) two options for solving this. We could use an array **=SMALL(IF($A$2:$A$22<>$A$3:$A$23,ROW($A$2:$A$22),””),I2)** to get the row number of the last item (don’t forget to press ‘Control’ ‘Shift’ ‘Enter’ instead of just ‘Enter’) along with this index function **=INDEX($B$1:$B$22,J2)** to get the answer.

Alternatively, in this case, we know that the total is adding up all the values above that are in the same group. So, we could just do a SUMIF for each unique category and divide by 2.

Download my Excel file **here** or from my **OneDrive** (file 00167). Watch my **YouTube video**.

I’ve worked with data since 2001. Discovering new techniques is a fun part of being a Data Analyst. I was going to add a 2nd caption saying “I’m going dancing” but most Data Analysts wouldn’t do that because moving on to the next data challenge would be more exciting!

]]>

**Instead of counting individual numbers that are above or below our targets we need to count the groups that are above or below our targets.**

Our max target is currently set to 100 and the min target to 40. Our solution needs to be dynamic as these limits (inputs) can be changed at any time.

In the pic below, conditional formatting helps us see the first group of numbers that are all above our upper target of 100. The 91 is below 100 so the group stops at value 101. Further down we see a 2nd group with the values 104 and 106. In this sample we have 2 groups. We also have a lower limit of 40 that works in the same way.

Before we jump into “Solution Mode” it’s important to know the amount of data. We have 30007 rows of data. File size for this raw data is 256KB (using Excel 2016 64 bit).

**Can we use a single formula to solve this?** Who knows, maybe it’s possible but it would be a very complex multi function formula. I know that VBA could solve this but that would take me all day to write the VBA! **I solved it with two helper columns (it could be reduced to 1 helper column) and then a simple COUNTIFS function.**

I’d like to identify or flag the first number in each group that’s either above our max number or below our min number. I’ve hidden some rows in the pic below to show more groups.

If you download my Excel file you’ll notice that I use formula **=AND($C9>=$C$1)** in cell F9. This is my “get started” approach. This formula flags all values above our max target.

In cell G9, I extend this formula to **=AND($C9>=$C$1,$C8<$C$1)** so that it flags only the first value in the max group.

I can now easily modify this to also work for the MIN groups: **=AND($C30<=$C$2,$C29>$C$2) **This formula is from cell H30.

A final formula counts the TRUE values in columns G & H **=COUNTIF(G6:G30012,TRUE)+COUNTIF(H6:H30012,TRUE)**

We can reduce the solution down to only one helper column (‘ALL IN ONE’). In cell I6 I use this formula:

** =OR(AND($C6>=$C$1,$C5<$C$1),AND($C6<=$C$2,$C5>$C$2))**

We are simply dropping each of the AND formulas inside of an OR formula.

I use this formula to count the TRUE values in column I **=COUNTIF(I6:I30012,TRUE)**

Download my Excel file **here** or from my **OneDrive** (file 00166). Watch my **YouTube video**.

I’ve been a Data Analyst since 2001. Mostly Excel and SQL. When I’m not writing formulas I occasionally doodle. I have no idea why I started doodling. It just happened. I also have no idea how to edit these doodles so I often end up editing them in Excel

I found the Excel file here (city of Toronto). At the bottom see “Indoor Ice Rinks Data”. The Excel file is only **18kb** containing **13 columns and 54 rows of data**. Check out the SQL statement in cell A2 (sheet “SQL”). You will need to increase the size of the formula bar to see all of it!

This pic shows most of the fields. Notice ‘Pad Length’ and ‘Pad Width’ fields along with ‘Indoor Ice Pad Field Type’ field. **It’s Canada, what did you expect?!**

When I saw the ‘X Coordinate’ and ‘Y Coordinate’ fields I wondered if I could finally use Excel’s 3D Map feature! As I have lived in or around Toronto since July of 2000 I thought it would be interesting to see the ice rinks plotted on the map.

Despite my lack of experience working with maps it was very easy to create this! The color indicates the district of Toronto and the height indicates multiple rinks in the same location.

In Excel 2016: click ‘Insert’ on the Ribbon and then ‘3D Map’. You might need to install it but it doesn’t take too long.

In the ‘Layer Pane’ go to ‘Location’. Click ‘Add Field’, select field ‘X Coordinate’, in the drop down list select ‘X Coordinate’. Repeat for ‘Y Coordinate’. These fields were named perfectly!

In the ‘Layer Pane’ go to ‘Category’. Click ‘Add Field’, select ‘District’. This not only assigns each District a color but it also add the height (higher means multiple rinks per facility.

Hover over the data points (rinks) and you’ll see additional information. Click on the wheel icon (top right of pic) and you can customize what you display when hovering over the data points.

In the bottom right of the map you’ll find these control buttons. The arrows rotate and the + – zoom in and out. It’s really easy to use!

On the ribbon at the top press ‘Map Labels’ to add highway names, street names and neighborhood names.

**Here **is my Excel file. You’ll need to have 3D Map installed to view the map.

I was impressed with how easy it was to build the map. Yes, other mapping software have more features, but Excel 3D Map was so quick and easy! If you just need the basics then I would highly recommend using 3D Map. If you’ve already got Excel 2016 (I’m not sure for previous versions) then you simply enable the 3D Map add-in and start playing around with it!

My name is Kevin Lehrbass. I live in Markham, Ontario, Canada. I’ve been studying, supporting, building, troubleshooting, teaching and dreaming in Excel since 2001. I’m a Data Analyst at McKinsey & Company.

** There are so many amazing things that you can do with this powerful software**. Check out my

Away from Excel I enjoy learning Spanish, playing Chess, hanging out with Cali and Fenton and reading Excel books

]]>We have **3 fields** and **3656 rows** of data.

Look carefully at the data below. **Can you see what the challenge is?**

For each ‘CustomerID’ we need to add up the ‘Sales’ amount per month. **But, we have data at the day level not the month level. We need to aggregate it up to the month level.**

Get The Excel File **here** and follow along!

This is my **favorite solution**. Why? It’s **so simple and quick!**

Create a Pivot Table with ‘Customer ID’ in ‘Rows’, ‘Date’ in columns and ‘Sales’ in ‘Values’ area. Note that you might have to group ‘Date’ by month. We now have the monthly aggregated total for each customer. Then add a MAX function to get the largest aggregated amount.

It’s almost perfect but the pivot would need to be refreshed if you add or change data and you might have to adjust the range of the MAX function if your Pivot Table expands.

Here is Mike’s array (note that AGGREGATE function can handle arrays without control shift enter).

**=AGGREGATE(14,4,SUMIFS(F8:F3663,E8:E3663,A8:A88,D8:D3663,**

**“>=”&EDATE(B3,{0,1,2,3,4,5,6,7,8,9,10,11}),D8:D3663,**

**“<=”&EDATE(EOMONTH(B3,0),{0,1,2,3,4,5,6,7,8,9,10,11})),1)**

**Why such a complex formula?** If you don’t like the pivot table taking up space in your sheet and you want a single cell solution then all the steps have to be done inside of a single formula. Yes, this solution is dynamic (the Pivot Table solution requires a refresh if data changes) but is it really worth it?

For me, I love arrays, but this formula is definitely a stretch. Nevertheless, I like it because I want to learn more about the versatile and powerful AGGREGATE function. I haven’t yet become comfortable enough with the AGGREGATE function to be able to quickly use it.

I was thinking “**Is there possibly an easier to understand multiple step dynamic solution?**” You’ll find my solution in sheet ‘Kevins Helper Solution’.

Solution Steps

- Column Q helper truncates ‘Date’ values to start of month (i.e. 2016-07-28 becomes 2016-07-01)
- Columns C to N calc monthly total per ‘CustomerID’. Formulas in row 6 dynamically create start of month values. Sumifs starting in row 8 calculate ‘Sales’ per ‘Month’ and ‘Customer ID’
- Now that we have all the monthly totals per ‘CustomerID’ the simple MAX function in cell T5 calculates the final answer!

Yes, this method requires a lot of cells for the formulas but some may prefer this as it’s easier to audit compared to the array solution. However, if we had to do this for every month over many years (not just 1 year as we have here) then we would need a ton of helper columns and it would probably not be a good solution.

**9 times out of 10 Mike’s Pivot Table and Max formula should win!** Super quick and easy to explain. The one formula array solution is for Excel power user’s and my helper column solution would work for non power users that want a dynamic solution that they can audit and understand.

I’ve created this matrix to compare the solutions based on several factors. Note that there are comments in most cells that you can see if you download my Excel file.

**What solution do you prefer and why? Can you think of another solution?**

My name is Kevin Lehrbass. I live in Markham, Ontario, Canada. I’ve been studying, supporting, building, troubleshooting, teaching and dreaming in Excel since 2001. I’m a Data Analyst at McKinsey & Company.

** There are so many amazing things that you can do with this powerful software**. Check out my

Away from Excel I enjoy learning Spanish, playing Chess, hanging out with Cali and Fenton and reading Excel books

]]>

Before we look at this challenge, don’t forget that we can’t create the ideal solution unless we’ve asked the right questions. Is this a one time task? How long would it take to complete manually? Should the solution be easy to understand? What version of Excel is being used? Can we re-arrange the data and then solve it? If it’s a long term solution, can we change the data input structure? (normalized format)

Follow along with Leila’s **Excel file** (modified with solutions from me, Wasif Mustafa and Oz du Soleil).

Each ‘App’ listed in column H is found somewhere in columns B, C, or D. When found, we want to return the column header (the ‘Division’).

**One formula solves it!** Complex formulas for some but an expert can create it in a couple of minutes.

Leila’s Sumproduct formula **=INDEX($B$4:$D$4,,SUMPRODUCT(($B$5:$D$45=H5)*(COLUMN($B$4:$D$4)-COLUMN($A$4))))**

My Array formula **=INDEX($A$4:$D$4,MIN(IF(H5=$B$5:$D$45,COLUMN($B$5:$D$45),””)))**

Instead of 1 complex formula, what about breaking the solution down into easier to explain pieces? Some people have no interest in learning complex formulas but can follow carefully documented steps. **I initially missed that fact that there can sometimes be multiple ‘Apps’ listed per row. This made it more challenging.** It might not be an ideal solution but I got it to work!

Advanced Excel users might roll their eyes at a multi-step solution. Don’t forget that casual Excel users prefer understandable solutions.

**1. helper** (concatenate all text per row) **=”,”&B5&”,”&C5&”,”&D5&”,”**

**2. get helper** (lookup App, get helper value) **=INDEX($E$5:$E$45,MATCH(“*,”&H5&”,*”,$E$5:$E$45,0))**

**3. Left of ‘App’** (display what’s to the left of ‘App’ in step2) **=LEFT(I5,FIND(H5,I5)-1)**

**4. Count commas** (count the commas in step3) **=LEN(SUBSTITUTE(J5,SUBSTITUTE(J5,”,”,””),””))**

**5. Get Answer** (index column headers using step4 value) **=INDEX($B$4:$D$4,K5)**

Each mini step can be explained to the casual Excel user.

The data is not normalized so this makes any solution more challenging. Some people like to present the data in a matrix format but analyzing that data afterwards is often more challenging.

We could **normalize the data quickly using the Pivot Table ALT D P** trick. Once it’s normalized the **index & match functions quickly solve it** for us! If more data is added, it could be added in the new normalized structure. This way** we don’t have to normalize the data or refresh a query ever again!**

If you have Get & Transform (aka Power Query) you can create a simple query that will normalize the data. Then, a quick INDEX & MATCH formula solves it! End users can add more data in the original structure but they will need to refresh the query. After my video I added this solution in my Excel file and later on **Oz du Soleil** created a **video** as well. Oz loves Get & Transform!

This idea came from a YouTube viewer **Wasif Mustafa**. He sent me his solution and it’s great! Use a match formula like this: **=MATCH(H5,$B$4:$B$45,0)** for columns B, C and D. Then this IF statement **=IF(ISNUMBER(M5),”Productivity”,IF(ISNUMBER(N5),”Games”,IF(ISNUMBER(O5),”Utility”,”App not found”)))** in column I to get the answer!

I modified **Wasif**‘s idea and came up with another variation of this. **Oz du Soleil had a “3 helpers in 1” idea** along with an INDEX function (Oz used INDEX function not VLOOKUP!!!).

Currently, we have only 40 rows of data and we have 12 apps to find. We could use Excel’s Find feature to locate each ‘App’ and then copy/paste the column header. Not an exciting solution but it’s a quick and simple “**Get ‘er done**” solution.

Over the years, I have met a couple of VBA programmers that “think in code” like I think in formulas. They could easily create code to solve this. It would take me a long time.

Like in all cases, understand the requirements carefully (I initially missed that there can be more than 1 ‘App’ per row). Yes, listening is important but ask questions too! Then, before building the solution consider all relevant factors. Build the solution and teach it back to the person that you’re helping.

Thanks to **Leila Gharani** for the interesting puzzle and sumproduct solution, thanks to **Oz du Soleil** and **Wasif Mustafa** for their awesome solutions!!

Leila’s **post**, Leila’s **video**, Leila’s **courses, **Oz’s **video**, Oz’s LinkedIn **post**.

** There are so many amazing things that you can do with this powerful software**. Check out my

Away from Excel I enjoy learning Spanish, playing Chess, hanging out with Cali and Fenton and reading Excel books

]]>

Let’s use population by state for the United States.

**STEP 1 ** **EXPANDING SUM FORMULA (Cumulative Sum)**

We have our original data: ‘**State**‘ and ‘**Population**‘. We add this simple formula in cell C6 **=B6+C5 ** alongside all of our data.

**STEP 2 ** **CREATE RANDOM NUMBERS**

We add this formula **=RANDBETWEEN(1,’Original Data’!$D$5) **that creates random numbers between 1 and 319451069 (total sum of the population).

**STEP 3 ** **APPROXIMATE MATCH INTO STEP 1**

We add this formula **=MATCH(A6,’Original Data’!$C$5:$C$55,TRUE) **that bins our random number back into our expanding sum. We bin by using TRUE for approximate match.

**STEP 4 ** **INDEX FUNCTION GETS OUR ANSWER**

We add this formula **=INDEX(‘Original Data’!$A$6:$A$55,B6) **The index function references our text ‘State’ values and uses the result of the match function (Step 3) to display a state.

Here is my **Excel file** (or get it **here ** from my OneDrive). Here is my **YouTube video**.

Step 1 runs alongside your original data. Drag it down further if you have more data.

Steps 2, 3, and 4 are dragged down as far as you want in sheet ‘Randomly Created Data’. If you don’t drag the formulas down very far you’ll see more variation.

Sheet ‘Pivot & Formulas to Verify’ shows how close our randomly generated data is to our original state population data.

**That’s it, we are finished!**

—————————————————————————————————————————–

But wait……

Say what? **What if you want more variation in your random data. After all, isn’t it supposed to be random??** Good point.

*Fasten your seat belts ladies and gentlemen. It’s about to get nerdy!*

**Random Variation Options**

I have extended our solution to give us these three options:

- Use original expanding range (smallest variation)
- I want some variation. Currently set to 30.0% Based on value in cell F3
- I want to add variation manually (using columns H & I)

**Option 1**: Smallest variation if we’ve dragged down the formulas far enough in sheet ‘Randomly Created Data’

**Option 2**: Type in a % value in cell F3 that will increase or decrease (it’s random) the individual state population

**Option 3**: The option to manually type in a positive or negative number to be added or subtracted to our state population

Above we see that option 2 has been selected. Randomly add or subtract a percent of each state’s population.

The randomly generated ‘State’ data in column C of sheet ‘Randomly Created Data’ is now updated. Refresh the pivot table in sheet ‘Pivot & Formulas to Verify’ to see the variation.

*Isn’t that cool?*

Here is my **Excel file** (or get it **here ** from my OneDrive) that includes the additional variation options.

Simply change the numerical values to be the same value (i.e. 1).

Or, check out these solutions from **Exceljet** and **Contextures**.

**I like**: pineapple, mushrooms, olives, coffee, chocolate mint ice cream, NBA, listening to Spanish radio, data (obviously), my dogs, playing chess, drawing nerds and listening to music on Spotify.

**Random Facts**: I’m tall but not freakishly tall unless I’m in Costa Rica for work where the average height is lower and I’m 3+ standard deviations above the average height (hence the increased stares). I met NBA legend Bill Walton at the top of a pyramid north of Mexico City. I like book stores. I have a better than average memory (according to my siblings). I am a long-suffering Maple Leafs fan (if the Red Sox and Cubs can win we can too!).

**Strange:** Before the age of 40 I had never traveled to Europe. I simply had to go! After the initial trip I then had two business trips to Europe (3 trips to Europe in about 4 years!). Blindfolded I can tell the difference between Starbucks, Tim Hortons and Second Cup coffee. I’m a decent chess player but I could never solve a Rubick’s Cube (I got four sides once). I have an abnormal obsession with Microsoft Excel (or so I’m told). In a previous job I was allowed into the computer server room to test if databases were running. I wasn’t allowed to type or touch anything so I had to verbally spell out the SQL queries to another IT person who had permission to type.

Most of us would simply stop running. Not Krista. She doesn’t give up easily. Focus, determination and grit are words that I would use to describe her.

I can remember the first time that Krista broke her leg. She was only 1 and had only just started walking on her own. I can vividly remember her with her cast. When she cried we would give her toys and play with her. When the cast came off mom told us not to hand her the toys but to set the toys a few feet away so that Krista would have to get moving again. I can remember an adult saying “**She might never walk properly**“. Ahhh, wrong!

Despite her injuries, Krista also had to pass the Canadian Olympic committee’s challenging criteria to quality for the Olympics. She trained diligently, met the requirements (**Globe & Mail article**, **Toronto Star Article**), stayed healthy and made it to the Olympics in August of 2016!

A group of us traveled down to Rio to cheer for Krista. During the race, we saw video updates on the big screen and diligently watched the ticker at the stadium. We were all so proud and relieved when we saw her enter the stadium and cross the finish line! What an incredible experience.

This was our group relaxing at Canada House after the race.

A few weeks ago I was trying to find the race data. Did she finish 34th or 35th? What was her time? 2:35:00 or 2:36:00? I finally found some data from **www.olympic.org/**

Each entry was three rows, there were logos and hyperlinks. We can’t easily analyze this data unless we re-arrange it. I thought of several ways to re-arrange the data but using some INDEX functions was the easiest (see my Excel file below). Now the data looks like this! Each row is a runner, each column is a field.

I created some Pivot Tables to answer questions like these:

- Fastest average time by country (excluding runners who didn’t finish the race)
- Percent of athletes who did not finish the marathon and those that did finish the marathon
- Average marathon time (for those that finished)

Sheet “Quartiles” calculates the quartiles (splitting runners who finished the race into four groups).

**There were triplets who qualified for the women’s marathon. Can you create a solution (1 formula or several steps) that will list all three names?**

Use the data in columns G and H of sheet “Cleanup via INDEX formulas”.

HINT: They have the same last name, their first names all start with the same letter and as you might expect they are all from the same country.

Here is my **Excel file**. or get it **here** from my OneDrive.

**HAPPY CANADA DAY! 150 YEARS TODAY!**

** There are so many amazing things that you can do with this powerful software**. Check out my

You open your friend’s Excel file and discover that **some of the formulas aren’t working and include the letters XLFN** ! You call your friend but he says that everything looks perfectly fine on her laptop. Did you get too much sun? Did you eat some bad fish? Did you smoke one of Oz du Soleil’s cigars?

xlfn is a prefix added to functions that don’t exist in the version of Excel that you are using. WHAT?!?!

You have Excel 2013 and your friend has a newer version of Excel (Office 365 or Excel 2016). He uses a cool new function and sends the file to you. As you have Excel 2013 this cool new function doesn’t yet exist and you see xlfn in front of the function.

Last year I discovered David Hager’s Excel blog. He shares a lot of neat ideas. I recently saw this post: **Conditional Format Rows in List 1 that are Not in List 2**

When I opened the file I noticed that the solution wasn’t working for me. I went back to David’s post and looked at this pic:

I noticed that David used the CONCAT function. This must be a new Excel 2016 (or Office365?) function! There are a bunch of really interesting new functions but I’m still using Excel 2013.

“Remove the unsupported functions, or if possible, replace the unsupported functions with supported functions.” Also, read **this**.

Although not as easy as David’s solution we can still produce the same end result.

Here are the steps to my workaround solution:

- Use a helper formula to concatenate all values in both tables: (i.e.
**=K2&L2&M2&N2&O2 )** - Adding this
**=ISNUMBER(MATCH(A2,$J$2:$J$6,0))**shows whether or not the row is found (Cell A2 is key in table 1. Column J is key in table 2) - Add this formula inside your conditional formatting rule:
**=$B2=FALSE**

Here is David’s **Excel file** that includes my workaround solution for those that don’t have Excel 2016.

You can find David at **https://dhexcel1.wordpress.com/** and **https://twitter.com/dhExcel**

** There are so many amazing things that you can do with this powerful software**. Check out my