## Welcome to this Blog: Excel with ExcelMaster

### 21 04 2017

**This Blog contains an ever growing set of detailed pages on How to … do things and pages of simple but very useful Tips.**

**6th December 2019**: Today’s contribution to this blog is a page I have written on the XOR function. This is something of an odd function since I don’t think I have seen it in action. Never mind that, it is not difficult to use and understand and there are clearly many uses for it. As a bonus I have included the ISODD() and ISEVEN() functions in this article and, hot on the heels of yeseterday’s post on IF, IFS and CHOOSE, this is a totally topical page! You can find the page here and there is an Excel file to download, too.

**5th December 2019: **If you have ever wondered about the use of Nested IF, IFS and CHOOSE, look no further because I just created a page for you. Two of the examples are easy and the third example is much more of a challenge. Go here to see the page https://excelmaster.co/nested-if-ifs-and-choose/

**5th November 2019** For the benefit of all Brits … have a happy and safe Bonfire Night. Secondly, look out for my NEW page, Quora Questions. Just scroll down from here and you will see the heading, just click it to open and read what I am doing. Simple concept with some very useful ideas.

**26th September 2019**: I have created this page to show how I went from an image on a web page, via OCR software, to a relatively sophiticated Excel file creation that uses Data Types … Stocks, Excel Tables, Pivot Tables, Conditinal Formatting and more.

**13th September 2019**: a fantastic page on corporate bonds and their analysis. How to program a table using dates, the IF(), AND(), MONTH(), YEAR() functions and arithmetical calculations. If you find difficulty using dates, consider this page.

**11th September 2019**: a friendly introduction to the setting up and use of a Training/Testing Model in Excel. It is an introduction but it is a good one. The page does not, however, carry out any detailed analysis of the validity of the model you will read about. The data are real and you can replicate what I have done very easily. The page is here.

**22nd August 2019**: As you all know, this site is free of charge and always will be. Every now and again, I announce something like the publication of one of my books. Sometimes my books are not free of charge because they are professionally published. Whilst that is true of my latest book, it IS free of charge, at least for a while. The title of the book is EXCEL POWER QUERY, AN INTRODUCTION: BUSINESS INTELLIGENCE PART I.Click on the title to go to the site where you can download it free of charge.

**1st August 2019**: I have already created two pages (Flash Fill, Flash Fill and Quick Analysis) on Flash Fill, both for Excel and for Power Query and here is another one. In this case, I am introducing even more ideas on how Flash Fill (FF) can be used very effectively. Firstly, by using FF to extract, combine, extract and combine; and secondly, I watched a video of a highly respectable Excel practitioner who tried to sell us the idea that there are times when FF is just not good enough and neither is Power Query: in that case, he said, use a formula … he demonstrated a relatively complex formula. The formula worked but I am showing here that that presenter is wrong and that FF will do exactly what we want without programming anything.

**14th July 2019**: A different approach but the same quality. I have just posted my latest two videos to YouTube. Video 1 is about Flash Fill and Quick Analysis in Excel. Video 2 is about Flash Fill in Power Query and Quick Analysis in Excel. The aim is to illustrate how it is possible, even with dirty data, to create a basic dashboard within 10 minutes! Video 1 … Video 2

**19th June 2019**: **BOOKS** … Since I was last here, I have completed writing two books on Excel and I will announce publication details here when I have them. The first book is the fourth in my Excel Solutions for Accountants series and the second book is the first in the series on Power Query, Power Pivot, Power BI. These books are the only things I talk about here that are not free of charge.

**CASES** … in addition to books, I create case studies and for courses I am running at the moment, I am sharing four such cases with you, in a PDF file. There are two cases on financial analysis, one case on budgeting for buying and running a private jet and a case on exchange rates. Look at the page to see the outline of each case and what you need to know about Excel to work through them.

**5th May 2019**: If you are serious about learning VLOOKUP in the Power Query and Power Pivot environments, look no further. I have created two videos, one of PQ and one for PP to help you. Just go to this page and take a look at my detailed explanations.

**20th March 2019**: One file, **two videos**. This page outlines what I did after downloading some **World Health Organisation** data on DTP3 vaccinations (Diphtheria, Tetanus and Pertussis), covering the period 1980 to 2017. From a health point of view, what you see here is fantastic. From an Excel point of view, what you see is intermediate level but there are enough features illustrated to make it well worth your while to take a look at it! The page is here

**6th March 2019**: This page ends with an Excel file but it is really a discussion of how I created some Power BI files that I then used to create the Excel files by copying **M Language code** from one to another. What I describe here is magical and I have used the departures and arrivals information for both of Bangkok’s two international airports as the basis of my work. The page you want is here and there are two bare bones Excel files to download … Word Press will not allow me to share Power BI files, I am sorry to say.

**15th February 2019**: Let’s watch a video! I have created a video showing you how to use Data Types Stocks to pull in share prices, Beta values, market capitalisations of potentially thousands of different companies from around the world. There is a video to watch and a spreadsheet to download. The page is here: Data Types … Stocks

**7th February 2019:** I know you have read my pages on Sparklines and therefore you know how clever they can be and how you can format the cells they are in, you can add text/formulas to the cell they are in. Well, now, you are about to learn to use Conditional Formatting Icons in them. As far as I know, you can find this technique nowhere else on the web! Here is the link to the page Sparklines with ICONS

**9th January 2019**: This is a fabulous page … not because I am so brilliant but because I have just learned how to combine **array constants with a VLOOKUP function**. It has been around for years but it just filtered down to me. You can thank me later! Here is the page you need: https://excelmaster.co/vlookup-with-array-constants/

**8th January 2019: Happy New Year Everyone. **Secondly, the purpose of this update is to share with you my solution to creating a histogram for any one of àbout 90 possible line items in a ratio analysis worksheet. The data relate to Netflix and comprise a ten year view of the ratios that come from the morningstar.com web site. The file also includes my Positive Skewness Test that I have recently started to program and use. There is a file to download too and if you find it useful, please tell me how you are using it. the file is here: https://excelmaster.co/one-histogram-90-choices/

If you’d like my help and guidance on something, just ask and I’ll do what I can.

Duncan Williamson

Introduction for Absolute Beginners: Introduction to Excel for Absolute Beginners

Excel Files for Practice:

The basics of spreadsheeting 1

The basics of spreadsheeting 2

The basics of spreadsheeting 3

The basics of spreadsheeting 4

## SUMDIVIDE … sort of

### 08 03 2016

A delegate asked me today if there was such a function as SUMDIVIDE. There isn’t of course, but I found a way to simulate it.

What would SUMDIVIDE do? SUMDIVIDE would have array 1 divided by array 2 and the results then added together: in the same way that SUMPRODUCT multiplies and then adds.

This is how it works: imagine A1:A5 contains array 1 and B1:B5 contains array 2 then the SUMPRODUCT function to divide them will be =SUMPRODUCT(A1:A5,1/B1:B5). Simple, eh? Who’d have thought it would be so simple.

Duncan Williamson

## Two New Cases

### 06 02 2015

Here are two new Excel based cases I have just prepared that I know some of you will appreciate.

**UK Petrol Prices**

I downloaded a file of all retail petrol and diesel prices for the UK from 2003 to 2014. The task is to prepare an interactive table so that the user just enters a date in one cell and the table then shows the

- retail pump price per litre
- duty per litre
- VAT percentage
- calculation of the cost of the petrol net of duty and VAT

This case involves the use of a variety of techniques including

- VLOOKUP()
- Data Validation
- IFERROR()
- Paste Special Multiply

Here’s an example of my output:

This video summarises the case:

**Sleep Requirements.**

In today’s *Borneo Bulletin* newspaper there is an article on the sleep requirements of people of all ages. They give the requirements such as, a new born baby needs from 14 to 17 hours a day … someone over 65 years of age needs from 7 to 8 hours sleep a day.

The task is to turn a photo of the data into a table and a chart that communicates as effectively as possible: I prepared the following:

Please feel free to write to me at any time to ask for the spreadsheets that accompany these cases. At the moment they are live cases and I won’t release them generally until the course has finished in a week’s time..

Duncan Williamson

## AGGREGATE Function Templates

### 11 11 2013

I know I learned this function a while ago but then I forgot about it. The aggregate function was newly created for Excel 2010 and it provides us with some interesting functionality: overcoming shortfalls in the performance of such functions as AVERAGE, MIN, MAX, LARGE, SMALL and a few more … 19 of them altogether. The trouble is, good as it is, it is not that simple to apply. What I have done then is to create templates that will help you to use the aggregate function in one or both of the formats in which it might be used.

From the Excel Help File:

*Returns an aggregate in a list or database. The AGGREGATE function can apply different aggregate functions to a list or database with the option to ignore hidden rows and error values.*

*Syntax*

*Reference form*

*AGGREGATE(function_num, options, ref1, [ref2], …)*

*Array form*

*AGGREGATE(function_num, options, array, [k])*

*The AGGREGATE function syntax has the following arguments (argument:*

*Function Number*

*Required. A number from 1 to 19 that specifies which function to use*

*Options*

*Required. A numerical value that determines which values to ignore in the evaluation range for the function*

*Ref 1*

*Required. The first numeric argument for functions that take multiple numeric arguments for which you want the aggregate value*

*Ref 2*

*Optional. Numeric arguments 2 to 253 for which you want the aggregate value*

*For functions that take an array, ref1 is an array, an array formula, or a reference to a range of cells for which you want the aggregate value. Ref2 is a second argument that is required for certain functions. The following functions require a ref2 argument:*

*LARGE(array,k)**SMALL(array,k)**PERCENTILE.INC(array,k)**QUARTILE.INC(array,quart)**PERCENTILE.EXC(array,k)**QUARTILE.EXC(array,quart)*

*The AGGREGATE function is designed for columns of data, or vertical ranges. It is not designed for rows of data, or horizontal ranges. For example, when you subtotal a horizontal range using option 1, such as AGGREGATE(1, 1, ref1), hiding a column does not affect the aggregate sum value. But, hiding a row in vertical range does affect the aggregate.*

My templates will tell you if you are trying to use the wrong format of aggregate and has then been set up to ensure you don’t make any other mistakes when using it. This includes providing combobox guidance for choosing which functions and options you need to use.

The Excel file is available here: aggregate_function … just click!

All feedback is warmly received as are suggestions for improvement.

Duncan Williamson

## Wildcards are Great … Until THIS Happens!

### 11 11 2013

**Wildcards**

As I am working away this week, I can be found looking at, opening up, working on a spreadsheet or two. Last night I came across yet another excuse to build an Excel data set. I found the TopTrack 250 and just had to have it: all seven years’ worth of day for the top 250 companies according to the Top Track definition. Look here for the 2013 data set.

So I duly copied and pasted the data for 2013 into a spreadsheet and edited it. Having seen that I liked what I had done I then copied over the other six years’ worth of data from Top Track. Because the data copied over in a very standard and predictable way, I was able to select all six sheets of the additional data and work on them all concurrently: moving data from one row to another, setting up columns in a better way, lining up the data to make it consistent with what I had already done with the 2013 set. Easy and not too time consuming.

But now the wildcards. On the web site that the data came from they had symbols such as asterisks that pointed to a note that said … average, estimate … or something like that. I needed to get rid of them all! As it was late and I wasn’t looking carefully, I carried out an edit and replace of * and having pressed Replace All, found that ALL of my data disappeared … it was doing what a wildcard must do … in this case, any character was being replaced by nothing! A very hasty Ctrl+Z put everything back to the way it was but I still had to get rid of these symbols.

What to do? Delete every symbol manually? No, there were too many of them. Given that the symbol was in the same place in the cell it was in, at the beginning, I ended up with a formula solution that I entered in a new blank column that I would eventually use to replace the current data:

=IF(LEFT(D6,1)=”*”,RIGHT(D6,LEN(D6)-1),D6)

Why D6? That’s where the first of my data points is in each of the tables I set up. I then copied the formula across to the next cell on the right and then down to the bottom of the table … it worked a treat.

I remembered that I should have added that there were other symbols in the data in addition to the * and I amended my formula to cope with the ‡ symbol:

=IF(OR(LEFT(D6,1)=”*”,LEFT(D6,1)=”‡”),RIGHT(D6,LEN(D6)-1),D6)

Now I had to copy and paste my edited values as text rather than leaving them in formula format, otherwise I have to leave the original data in the file AND have the edited version. So I just copied and pasted the edited values over the original data and my data were now clean and tidy … but read on!

**Numbers as Text**

One problem remained: having replaced these symbols, the result was numbers as text rather than number as number. In this case I did this:

- enter 1 in any available cell
- copy that cell
- select the entire range of numbers … all of them so you miss nothing and don’t waste your time selecting just the affected ones if your data set is large like mine
- paste special, multiply
- ta daa! your numbers as text have now become numbers as numbers
- Delete that cell with 1 in it

There you are wildcards and paste special to set up a nice, clean table of data copied from the web.

Duncan Williamson