<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1869924468172210809</id><updated>2026-06-08T13:35:43.927+01:00</updated><category term="Excel"/><category term="General Comments"/><category term="notjustnumbers"/><category term="Pivot Tables"/><category term="Accounting"/><category term="Reporting"/><category term="Recession"/><category term="Cost-saving"/><category term="FREEBIES"/><category term="Guest Articles"/><category term="Banking"/><category term="Credit Crunch"/><category term="Events"/><category term="Social Media"/><category term="VAT"/><category term="Obama"/><category term="Art"/><category term="Printing"/><title type='text'>Not Just Numbers</title><subtitle type='html'>The blog for those who know it&#39;s not just about the numbers</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/12461985809302036952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkussk_wWqLxtTNyqxVgHkLjZH-9qN1eEVHmHPJAzKQeyxD9jfzi_46RMuS1Oqg5qZ3ZqhqAzCTKSGfJW6-aAmqyRQ2G-H_eOn-9eRZomHhuP2K4ySKMsZYN-_s_sjrzE/s220/64630013.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>337</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-6701121587303696024</id><published>2019-04-03T19:53:00.000+01:00</published><updated>2019-04-03T19:53:48.699+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Sorting a list -  an introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid1_UPrYAT39UoGXGYe-RyEzfQmKW7xNV0qE_-ugQLdeRyY8iWUVRtca4bonfiB2t6_wDE4uEZgnDjv6xlJ6rP8eX0pfSAcsHiKmv-z5Uu2LAWsZTutjACb7eoduJ3hgQK97iJsN8lDj8/s1600/Sorting.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1067&quot; data-original-width=&quot;1600&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid1_UPrYAT39UoGXGYe-RyEzfQmKW7xNV0qE_-ugQLdeRyY8iWUVRtca4bonfiB2t6_wDE4uEZgnDjv6xlJ6rP8eX0pfSAcsHiKmv-z5Uu2LAWsZTutjACb7eoduJ3hgQK97iJsN8lDj8/s320/Sorting.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Sorting a list is a very common use of Excel but there are a few things to consider when you do, and a few extra features that you may not be aware of.&lt;br /&gt;
&lt;br /&gt;
The first task is selecting the data you want to sort.&lt;br /&gt;
&lt;br /&gt;
If your data is in a table, if you select any cell in the table, Excel will assume that you want to sort the whole table.&lt;br /&gt;
&lt;br /&gt;
If the data is not in a table, Excel will still guess what you want to sort, however I think it is better to pro-actively choose, rather than assume that Excel will get it right!&lt;br /&gt;
&lt;br /&gt;
Make sure you highlight all of the rows in the range you want to sort. You can highlight whole columns by clicking on the column letters, which will ensure that all rows are included (not a good idea if you have other data below your list though).&lt;br /&gt;
&lt;br /&gt;
Also, make sure that all the columns in your data are included, otherwise you could end up irrevocably breaking up rows of data, by sorting some columns and not others!&lt;br /&gt;
&lt;br /&gt;
Once you have selected your data, click one of the sort buttons.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivefZAdGm-7JdXgHBWytJRb1nZm09zyNFFZCzVWs6P2kFI8I0tRK9PlQjn4isw_7JfSP1qxde2gyv4DlbQJckUFQF9Mv3Og9ua-sVjYkUfkYmf4wg_W0waeCqm7zP-V2yLExxvx0va9Lw/s1600/SortButton.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;133&quot; data-original-width=&quot;366&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivefZAdGm-7JdXgHBWytJRb1nZm09zyNFFZCzVWs6P2kFI8I0tRK9PlQjn4isw_7JfSP1qxde2gyv4DlbQJckUFQF9Mv3Og9ua-sVjYkUfkYmf4wg_W0waeCqm7zP-V2yLExxvx0va9Lw/s320/SortButton.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Clicking either of the two small buttons will sort based upon the first column of your data, either ascending or descending. The larger sort button (ringed above) gives you a lot more flexibility.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Clicking this will reveal the following box:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuSpiTx7FOPir8rLewNScLJjLYEbhM8tBKd9wSCdnBV7A-OvwFHQakA1EEsnqrxqC-oDrVq9IoCOg-drndtzDTWJy_D6JHmOesHTnFgkc58FlXbobSBR9rEFBVLK-ELzs6BGqO_mcYut4/s1600/SortBox.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;268&quot; data-original-width=&quot;586&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuSpiTx7FOPir8rLewNScLJjLYEbhM8tBKd9wSCdnBV7A-OvwFHQakA1EEsnqrxqC-oDrVq9IoCOg-drndtzDTWJy_D6JHmOesHTnFgkc58FlXbobSBR9rEFBVLK-ELzs6BGqO_mcYut4/s320/SortBox.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The first thing to check is that the tickbox &quot;My data has headers&quot; is correct, as, if ticked, this will treat the first row of your range as headers and not include it in the sort.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You can then choose which column to sort on. This is a dropdown of the column headings (if the tick box is ticked), or the column letters if not.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For the purposes of this introduction, we will assume that you want to sort by the contents of the cell (Cell Values in the Sort on dropdown), then in the final box you can select the order you want to sort in. The options will change, depending on the type of data in the column being sorted, e.g. A to Z for text, Smallest to largest for Numbers, Oldest to newest for dates, and all of their opposites.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Then click OK and your range will be sorted.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In a future post we will dig a bit deeper into the sorting options, including how to sort on multiple columns.&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/6701121587303696024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2019/04/excel-tip-sorting-list-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/6701121587303696024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/6701121587303696024'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2019/04/excel-tip-sorting-list-introduction.html' title='Excel Tip: Sorting a list -  an introduction'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid1_UPrYAT39UoGXGYe-RyEzfQmKW7xNV0qE_-ugQLdeRyY8iWUVRtca4bonfiB2t6_wDE4uEZgnDjv6xlJ6rP8eX0pfSAcsHiKmv-z5Uu2LAWsZTutjACb7eoduJ3hgQK97iJsN8lDj8/s72-c/Sorting.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-3921839978521315938</id><published>2019-02-26T19:50:00.000+00:00</published><updated>2019-02-26T19:50:03.684+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Some useful keyboard shortcuts to save you time</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_JD-p10TcKRmr2wOtMeilz-APjzhrHJ7x04cyF8VHT4pQwbn26eZV9ZuYKWUIoyOy1kaczQFaIYNaqCNgSzut0YsI0QnWbkjjUtANXPTl7cRtDGNGbsixpMjnYAadcTVx0hMTJaiZUco/s1600/Shortcut.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1068&quot; data-original-width=&quot;1600&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_JD-p10TcKRmr2wOtMeilz-APjzhrHJ7x04cyF8VHT4pQwbn26eZV9ZuYKWUIoyOy1kaczQFaIYNaqCNgSzut0YsI0QnWbkjjUtANXPTl7cRtDGNGbsixpMjnYAadcTVx0hMTJaiZUco/s320/Shortcut.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Hello stranger!&lt;br /&gt;
&lt;br /&gt;
I must start by apologising for the huge expanse of time that has passed since my last post. My consultancy workload has increased over the last year or so and the blog has been the main casualty!&lt;br /&gt;
&lt;br /&gt;
I&#39;m still pretty busy and may not be able to post as regularly as I have at some times in the past, but I will endeavour to post at least a post a month.&lt;br /&gt;
&lt;br /&gt;
OK, on with this month&#39;s post...&lt;br /&gt;
&lt;br /&gt;
Personally, I am not a huge user of keyboard shortcuts - as I struggle to remember too many - but there are a few that I find particularly useful, and I thought I&#39;d share those with you. I&#39;m sure many of you have your own favourites, so please share them in the comments. Mine are all for the Windows version. Any Mac users please feel free to post the Apple equivalents.&lt;br /&gt;
&lt;br /&gt;
Here are my favourites...&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;F4 - &lt;i&gt;add dollar signs&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;
I use this one all of the time. To add the dollar signs that fix rows and columns in formulae, you can simply press F4 while your cursor is on the cell reference in the formula, and each time you press it it will toggle to the next combination of $ signs in the following sequence - none, fix column and row, fix row, fix column and back to none.&amp;nbsp; If you don&#39;t understand how the dollar signs work, take a look at one of my most popular posts -&amp;nbsp;&lt;b&gt;&lt;a href=&quot;https://www.notjustnumbers.co.uk/2011/05/excel-tip-dollar-sign-in-formula-fixing.html&quot; target=&quot;_blank&quot;&gt;The dollar sign ($) in a formula - Fixing cell references&lt;/a&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Ctrl+; - &lt;i&gt;Enter today&#39;s date&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
This one is really useful when entering data into a spreadsheet, you can enter today&#39;s date into the current cell by simply pressing the Ctrl key and the semicolon together.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;b&gt;Ctrl+Shift+; -&amp;nbsp;&lt;i&gt;Enter the current time&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
Similar to the shortcut above, you can enter the current time into the current cell by pressing the Ctrl&amp;nbsp; and Shift keys and the semicolon together.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Ctrl+C - &lt;i&gt;Copy&lt;/i&gt;&lt;br /&gt;Ctrl+V - &lt;i&gt;Paste&lt;/i&gt;&lt;br /&gt;Ctrl+X - &lt;i&gt;Cut&lt;/i&gt;&lt;/h3&gt;
&lt;div&gt;
These are standard windows shortcuts, but are as useful in Excel as elsewhere. Be wary though about using cut/copy and paste generally, see these earlier posts if you aren&#39;t aware of them:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;a href=&quot;https://www.notjustnumbers.co.uk/2013/04/excel-tip-beware-cut-and-paste-is-not.html&quot; target=&quot;_blank&quot;&gt;Beware - Cut and Paste IS NOT the same as Copy and Paste&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;a href=&quot;https://www.notjustnumbers.co.uk/2014/06/excel-tip-copy-and-paste-avoiding.html&quot; target=&quot;_blank&quot;&gt;Copy and Paste - avoiding unwanted baggage&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Alt+F11 - &lt;i&gt;Open Visual Basic Editor&lt;/i&gt;&lt;/h3&gt;
&lt;div&gt;
This is a one for the coders out there and provides a quick method to open the Visual Basic Editor. This shortcut holds a special place in my heart as I managed to completely forget what it was on a live Webinar I was doing for the ICAEW!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
F9 - &lt;i&gt;Calculate&lt;/i&gt;&lt;/h3&gt;
&lt;div&gt;
This forces a recalculation of your Excel Workbook, which is useful if you have manual calculation switched on. A lesser known use is that you can highlight a section of a formula and press F9 and it will swap the highlighted text for its value - this is great for trying to find where the problem is in a long formula! See this post for more details -&amp;nbsp;&lt;b&gt;&lt;a href=&quot;https://www.notjustnumbers.co.uk/2017/09/excel-tip-how-to-evaluate-individual.html&quot; target=&quot;_blank&quot;&gt;How to evaluate individual parts of a large formula&lt;/a&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
As I said, I&#39;m not a big shortcut user, so I&#39;m sure many will consider some of the ones I haven&#39;t listed a travesty, so please restore justice in the comments!&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/3921839978521315938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2019/02/excel-tip-some-useful-keyboard.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3921839978521315938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3921839978521315938'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2019/02/excel-tip-some-useful-keyboard.html' title='Excel Tip: Some useful keyboard shortcuts to save you time'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_JD-p10TcKRmr2wOtMeilz-APjzhrHJ7x04cyF8VHT4pQwbn26eZV9ZuYKWUIoyOy1kaczQFaIYNaqCNgSzut0YsI0QnWbkjjUtANXPTl7cRtDGNGbsixpMjnYAadcTVx0hMTJaiZUco/s72-c/Shortcut.jpeg" height="72" width="72"/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-3760866471840574106</id><published>2017-12-21T17:20:00.000+00:00</published><updated>2017-12-21T17:20:25.600+00:00</updated><title type='text'>Merry Christmas...</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6t1PuPNdsaXWyRjQNtQw1d6Ne21kBotSBCnjt6SJqwHeWw6w0RpEWje09x9_Hdvc5IWWIQMM4C3CY9PG-xcDXQpDZRhLy8I_yEArsnnTjrtPPCWP4whxWokgjX_Zccz87TUtibdV6Axg/s1600/SantaSpreadsheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;537&quot; data-original-width=&quot;894&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6t1PuPNdsaXWyRjQNtQw1d6Ne21kBotSBCnjt6SJqwHeWw6w0RpEWje09x9_Hdvc5IWWIQMM4C3CY9PG-xcDXQpDZRhLy8I_yEArsnnTjrtPPCWP4whxWokgjX_Zccz87TUtibdV6Axg/s400/SantaSpreadsheet.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/3760866471840574106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/12/merry-christmas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3760866471840574106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3760866471840574106'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/12/merry-christmas.html' title='Merry Christmas...'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6t1PuPNdsaXWyRjQNtQw1d6Ne21kBotSBCnjt6SJqwHeWw6w0RpEWje09x9_Hdvc5IWWIQMM4C3CY9PG-xcDXQpDZRhLy8I_yEArsnnTjrtPPCWP4whxWokgjX_Zccz87TUtibdV6Axg/s72-c/SantaSpreadsheet.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-6951254330742260817</id><published>2017-10-06T14:19:00.003+01:00</published><updated>2017-10-06T14:40:23.980+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Use the HYPERLINK function to link to a cell on another worksheet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgjGkvCxTrpXM1Tci_m4cDzLjFTRz7_yr8ea2gAqef0W8nHBxD29L7vrBKYmH0-0BxK4lBagNOJwrZ5SzAtHgkBn3-0dG_vNKZbrxGyQJcOiJOSfuaQDqXv_01dPR5oGuNGaxvCwvPZuc/s1600/xlsxbuttons.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;346&quot; data-original-width=&quot;346&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgjGkvCxTrpXM1Tci_m4cDzLjFTRz7_yr8ea2gAqef0W8nHBxD29L7vrBKYmH0-0BxK4lBagNOJwrZ5SzAtHgkBn3-0dG_vNKZbrxGyQJcOiJOSfuaQDqXv_01dPR5oGuNGaxvCwvPZuc/s320/xlsxbuttons.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
The HYPERLINK function can be very helpful in Excel for creating multiple links to websites, other documents or cells in the current document based upon cell data.&lt;br /&gt;
&lt;br /&gt;
You can create a static hyperlink without it, but if you have a list of URLs or file paths, the function can allow you to dynamically create links to them without having to create each one individually and with the added advantage that the links will update if the underlying data is edited.&lt;br /&gt;
&lt;br /&gt;
It&#39;s a really simple function to use, but the Excel help function is very vague on how to use it to link to cells on another sheet in the same workbook.&lt;br /&gt;
&lt;br /&gt;
First of all a quick introduction on how to use the HYPERLINK function.&lt;br /&gt;
&lt;br /&gt;
It&#39;s syntax is:&lt;br /&gt;
&lt;br /&gt;
=HYPERLINK(Link address,[Friendly name])&lt;br /&gt;
&lt;br /&gt;
Where the Link address can be a file path, a cell location or a URL. The Excel Help on the function gives a useful list of the syntax for each of these (except for a cell on another sheet!).&lt;br /&gt;
&lt;br /&gt;
The Friendly name is optional and is the string you want to appear as the hyperlink. If this argument is not entered, the Link address will show in the cell.&lt;br /&gt;
&lt;br /&gt;
Take a look at the spreadsheet below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSbuIpu0SWS_dtramXpRESLWplq2XyVE4C2s4sgAEmcOB-mx78J9CPxj4uMRsMecAqHxtV1n6Us6oDkB7LPRQh0ofv2YUAUaCXg7sgPBiGTLkq0_v6ZiUxjr9DFo5Ntrm63MlIPyolyo0/s1600/HYPERLINK1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;131&quot; data-original-width=&quot;817&quot; height=&quot;64&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSbuIpu0SWS_dtramXpRESLWplq2XyVE4C2s4sgAEmcOB-mx78J9CPxj4uMRsMecAqHxtV1n6Us6oDkB7LPRQh0ofv2YUAUaCXg7sgPBiGTLkq0_v6ZiUxjr9DFo5Ntrm63MlIPyolyo0/s400/HYPERLINK1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The hyperlinks in column C are created using the HYPERLINK function, the formula in C2 being:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=HYPERLINK(B2,A2)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This can then be copied down the column. Columns A and B could be hidden or on a different sheet making the hyperlinks a user-friendly way of navigating to the websites.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now let&#39;s say we had a Sales workbook with a sheet for each department and a Summary sheet listing all departments&#39; sales, with the sales total being in cell H7 on each sheet. Let us also assume that the department name is used as the tab name for each sheet.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We want the summary sheet to show three columns as below:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis4MHj9d_dKTroG2-jXPjf80mBuf6Mqc9h5V0wvjn2hkSl1AZkZDa8klclsdRRnPQf38NIcJq7oQhfK4lw1XvVwvJIaWTeGU4tIjOsm2mQ-rYDUqZnVQP_PXDm9RpGrFWno6SJ-jP2y0Q/s1600/HYPERLINK2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;138&quot; data-original-width=&quot;673&quot; height=&quot;81&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis4MHj9d_dKTroG2-jXPjf80mBuf6Mqc9h5V0wvjn2hkSl1AZkZDa8klclsdRRnPQf38NIcJq7oQhfK4lw1XvVwvJIaWTeGU4tIjOsm2mQ-rYDUqZnVQP_PXDm9RpGrFWno6SJ-jP2y0Q/s400/HYPERLINK2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
...with column B showing the sales total in cell H7 on each of the sheets, and column C being a hyperlink to cell H7 on each of the sheets.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We can use the &lt;a href=&quot;http://www.notjustnumbers.co.uk/2014/06/excel-tip-referring-to-cells-based-on.html&quot; target=&quot;_blank&quot;&gt;INDIRECT function&lt;/a&gt; in B2 as follows:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=INDIRECT(&quot;&#39;&quot;&amp;amp;A2&amp;amp;&quot;&#39;!H7&quot;)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This can then be copied down.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This is the same as writing&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=&#39;Retail&#39;!H7&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Except we have used &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/06/excel-tip-manipulating-text-in.html&quot; target=&quot;_blank&quot;&gt;ampersands to concatenate&lt;/a&gt; the preceding single quote (&#39;), the contents of cell A2 (Retail) and &#39;!H7.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The reason for placing the single quotes around the tab name is to allow for spaces in the tab name.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You would then think that you could enter the following in cell C2:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=HYPERLINK(&quot;&#39;&quot;&amp;amp;A2&amp;amp;&quot;&#39;!H7&quot;,&quot;Visit &quot;&amp;amp;A2)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
NB: INDIRECT is not needed here because the HYPERLINK function expects a link in the form of a string.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
or even:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=HYPERLINK(&quot;&#39;Retail&#39;!H7&quot;,&quot;Visit Retail&quot;)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
...but each of these return an error when you click on the hyperlink.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
What the Excel Help doesn&#39;t tell you is that when referencing worksheets in the same workbook with the HYPERLINK function, &lt;b style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;you need to prefix the sheet name with a #&lt;/span&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
NB: If you enclose the sheet name in single quotes then the # comes before the single quote.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=HYPERLINK(&quot;#&#39;Retail&#39;!H7&quot;,&quot;Visit Retail&quot;)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
...will work. As will, for our example:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=HYPERLINK(&quot;#&#39;&quot;&amp;amp;A2&amp;amp;&quot;&#39;!H7&quot;,&quot;Visit &quot;&amp;amp;A2)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
...which can be copied down the list.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/6951254330742260817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/10/excel-tip-use-hyperlink-function-to.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/6951254330742260817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/6951254330742260817'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/10/excel-tip-use-hyperlink-function-to.html' title='Excel Tip: Use the HYPERLINK function to link to a cell on another worksheet'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgjGkvCxTrpXM1Tci_m4cDzLjFTRz7_yr8ea2gAqef0W8nHBxD29L7vrBKYmH0-0BxK4lBagNOJwrZ5SzAtHgkBn3-0dG_vNKZbrxGyQJcOiJOSfuaQDqXv_01dPR5oGuNGaxvCwvPZuc/s72-c/xlsxbuttons.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-4863616811636168330</id><published>2017-09-27T15:38:00.003+01:00</published><updated>2017-09-27T15:39:13.520+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: How to evaluate individual parts of a large formula</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFvSmkbZK1aalkwcdGbkaNm4nU6Mgf8IJM-lKX-8CKlAV7c8w4jsY3Q8XR48AF1CQ4mi-0zqhK8iZViqRp1WhAFSJQuuAMv1A7R9emsD6RnZ0XVRBwRZ4MzhSQ94ynhy0xvkmyhI-fUhQ/s1600/F9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;296&quot; data-original-width=&quot;405&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFvSmkbZK1aalkwcdGbkaNm4nU6Mgf8IJM-lKX-8CKlAV7c8w4jsY3Q8XR48AF1CQ4mi-0zqhK8iZViqRp1WhAFSJQuuAMv1A7R9emsD6RnZ0XVRBwRZ4MzhSQ94ynhy0xvkmyhI-fUhQ/s320/F9.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Just a short but very useful tip this month. But before we start, I&#39;d like to thank those readers who donated to Macmillan Cancer Support when I ran the Great North Run earlier this month. All donations are much appreciated and &lt;a href=&quot;https://www.justgiving.com/fundraising/glen-feechan&quot; target=&quot;_blank&quot;&gt;the page is still open&lt;/a&gt; for a little while longer if anyone would still like to donate.&lt;br /&gt;
&lt;br /&gt;
Have you ever written a long formula that isn&#39;t giving the result you&#39;d expect (or is returning an error), but you don&#39;t know which part is the problem? If you&#39;ve ever written a long formula, then it&#39;s a fair bet that you have!&lt;br /&gt;
&lt;br /&gt;
Well, there&#39;s an easy little trick that you might not be aware of, that can make this much easier to investigate.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The problem:&lt;/b&gt;&lt;br /&gt;
Say you have a formula such as:&lt;br /&gt;
&lt;br /&gt;
=IFERROR(IF(A2&amp;gt;3,1,0),0)&lt;br /&gt;
&lt;br /&gt;
It is returning 0 and you don&#39;t think it should be. This could be because A2 is 3 or less, or because the IF function is returning an error and you don&#39;t know which.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The solution:&lt;/b&gt;&lt;br /&gt;
You can evaluate any expression within the formula individually, using the F9 key.&lt;br /&gt;
&lt;br /&gt;
Within the cell or formula bar, highlight the section of the formula that you want to evaluate. In this case it would be useful to see whether the output of the IF function alone is a zero or an error, so highlight the IF expression:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=IFERROR(&lt;span style=&quot;background-color: #cccccc;&quot;&gt;IF(A2&amp;gt;3,1,0)&lt;/span&gt;,0)&lt;br /&gt;
&lt;br /&gt;
and press the F9 key. The formula will now show the result of the selected expression within the full formula, rather than the expression itself, e.g.&lt;br /&gt;
&lt;br /&gt;
=IFERROR(&lt;span style=&quot;background-color: #cccccc;&quot;&gt;0&lt;/span&gt;,0)&lt;br /&gt;
&lt;br /&gt;
or maybe&lt;br /&gt;
&lt;br /&gt;
=IFERROR(&lt;span style=&quot;background-color: #cccccc;&quot;&gt;#N/A&lt;/span&gt;,0)&lt;br /&gt;
&lt;br /&gt;
You can do this with as many expressions within the formula as you want, as long as you highlight an expression that on its own would return a result.&lt;br /&gt;
&lt;br /&gt;
In this formula you could have alternatively evaluated A2 or A2&amp;gt;3.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: When you have finished doing this, leave the cell by pressing Esc rather Enter so that you do not overwrite the expressions with the results.&lt;br /&gt;
&lt;br /&gt;
This is a simple formula for illustrative purposes, but if you have a really long complex formula, this tool can be invaluable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to k&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;now&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/4863616811636168330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/09/excel-tip-how-to-evaluate-individual.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4863616811636168330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4863616811636168330'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/09/excel-tip-how-to-evaluate-individual.html' title='Excel Tip: How to evaluate individual parts of a large formula'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFvSmkbZK1aalkwcdGbkaNm4nU6Mgf8IJM-lKX-8CKlAV7c8w4jsY3Q8XR48AF1CQ4mi-0zqhK8iZViqRp1WhAFSJQuuAMv1A7R9emsD6RnZ0XVRBwRZ4MzhSQ94ynhy0xvkmyhI-fUhQ/s72-c/F9.jpg" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-6864098336403789244</id><published>2017-08-18T17:21:00.003+01:00</published><updated>2017-10-24T10:02:46.723+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: An introduction to SUMPRODUCT and why you should learn it</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT5HQggZGJS8cKJW3VdqH5t3UN77T6X5bNmlNURHdPULdBtItQuynW430mEik9umhHcqNzD75IljKQlneDWPxghxyFZMihrA1OC4dxPAMMhg_iLcypV8x6rOFCWAv6mX__9Ns8nu1pzpM/s1600/ThinkingHard.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;282&quot; data-original-width=&quot;425&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT5HQggZGJS8cKJW3VdqH5t3UN77T6X5bNmlNURHdPULdBtItQuynW430mEik9umhHcqNzD75IljKQlneDWPxghxyFZMihrA1OC4dxPAMMhg_iLcypV8x6rOFCWAv6mX__9Ns8nu1pzpM/s320/ThinkingHard.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Let me start with an apology for leaving it so long without a post. It&#39;s been a busy time work-wise and, in addition, I&#39;ve taken up running to finally lose the excess weight and run the Great North Run half marathon next month. After spending the last 20 years or so doing very little exercise while sitting in front of a computer screen, I decided I had to do something about it - and raise some money for &lt;a href=&quot;https://www.justgiving.com/fundraising/glen-feechan&quot; target=&quot;_blank&quot;&gt;a good cause&lt;/a&gt; along the way!&lt;br /&gt;
&lt;br /&gt;
OK! Excuses over! I&#39;ve got a very powerful but often misunderstood function to tell you about.&lt;br /&gt;
&lt;br /&gt;
On the face of it, SUMPRODUCT does a very simple thing, it multiplies arrays together and sums the results. Unless you&#39;re a serious mathematician, you&#39;re probably thinking that this is not something you&#39;ve ever had a desire to do! But bear with me.&lt;br /&gt;
&lt;br /&gt;
I rated it one of the most useful and under-used functions in a &lt;a href=&quot;http://www.automateexcel.com/most-useful-excel-functions&quot; target=&quot;_blank&quot;&gt;recent survey&lt;/a&gt;&amp;nbsp;of Excel experts.&lt;br /&gt;
&lt;br /&gt;
First of all, here is a simple explanation of how it works:&lt;br /&gt;
&lt;br /&gt;
=SUMPRODUCT({5,6,4},{7,4,12}) returns 107 because:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHQd-I1Z5p0RU_d_CxXv8xrT2MevcUm-1rDEQ5M-E0I0gZ5BGikOxSCHT0Py8LBjW3czfTiOdZycLFu6fbUnP2yy3Bk7jsFEA88bZpvKfC3_-6rTIvs2pusv61Uc7LEP9TtviyHcy-pBM/s1600/SUMPRODUCT1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;106&quot; data-original-width=&quot;342&quot; height=&quot;99&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHQd-I1Z5p0RU_d_CxXv8xrT2MevcUm-1rDEQ5M-E0I0gZ5BGikOxSCHT0Py8LBjW3czfTiOdZycLFu6fbUnP2yy3Bk7jsFEA88bZpvKfC3_-6rTIvs2pusv61Uc7LEP9TtviyHcy-pBM/s320/SUMPRODUCT1.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
You can enter up to 255 arrays like this (as long as they are all the same size) and SUMPRODUCT will multiply them then sum the totals as above. That&#39;s basically what SUMPRODUCT does. Now let&#39;s look at why this is very useful.&lt;br /&gt;
&lt;br /&gt;
First of all, the SUMPRODUCT function allows you to work with arrays without entering the function using Ctrl+Alt+Enter, which means that you don&#39;t run the risk of accidentally clicking into the cell and clicking enter, then wondering why your array formula has stopped working. If you don&#39;t know what an array formula is ignore this point, as you don&#39;t need to worry about it with SUMPRODUCT. If you do, then you&#39;ll know what I&#39;m talking about!&lt;br /&gt;
&lt;br /&gt;
More importantly, the arrays entered into SUMPRODUCT can be formulae that result in arrays. The formula above could have been entered as:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
=SUMPRODUCT(A2:A4,C2:C4)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
if cells A2, A3 and A4 contained 5,6 and 4 respectively and cells C2, C3 and C4 contained 7, 4 and 12.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
But we could also (say) add 1 to each value in the first array before multiplying by entering:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
=SUMPRODUCT(A2:A4+1,C2:C4)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
resulting in 130 &amp;nbsp;- as ((5+1) x 7)&amp;nbsp;+ ((6+1) x 4)&amp;nbsp;+ ((4+1) x 12)) = 130.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
You&#39;re probably still saying, &quot;So what?&quot;, but here&#39;s where it gets useful.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
These formulae can use other Excel functions and, even more usefully, conditions that return arrays of Trues and Falses (converted into 1s and 0s).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Let&#39;s say that in the following data, we need to know the total quantity of product A sold in the North:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs6wsMETfdDu8SW6pVWupNkLnndozYFdV1SSj6NEdcssdfg2bRq2dCtb12eLHOxu62YGsFhV8AisQQiA9SsQEnGzJsjBRrgJxN9pURVTwH0GIS00Fx-pNZ5oiEAtSuZAoRHvUr260A0I8/s1600/SUMPRODUCT2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;218&quot; data-original-width=&quot;324&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs6wsMETfdDu8SW6pVWupNkLnndozYFdV1SSj6NEdcssdfg2bRq2dCtb12eLHOxu62YGsFhV8AisQQiA9SsQEnGzJsjBRrgJxN9pURVTwH0GIS00Fx-pNZ5oiEAtSuZAoRHvUr260A0I8/s320/SUMPRODUCT2.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
We could use SUMIFS as follows:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
=SUMIFS(C2:C8,A2:A8,&quot;North&quot;,B2:B8,&quot;A&quot;) which returns 38.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Or we could use:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
=SUMPRODUCT(--(A2:A8=&quot;North&quot;),--(B2:B8=&quot;A&quot;),C2:C8) to return the same answer.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
This works as follows...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
The formula (A2:A8=&quot;North&quot;) results in the array:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
{TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE} because these are the 7 results of the formula (A2=&quot;North&quot; is TRUE, A3=&quot;North&quot; is FALSE, etc.)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
By placing the double minus (--) in front of the formula, it forces this to return 1s and 0s instead of TRUEs and FALSES, i.e.:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
{1,0,0,1,0,0,1}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Our SUMPRODUCT formula therefore arrives at the same answer as the SUMIFS because the three arrays we are multiplying are as follows:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0Sq0MAvnvZDdezzlivRFluDzGQ_PLVVZvO5DtLi0Zj4lVyYzmLqmLu4ucW_PTERsV0XvNx-UE5poy4_p0jMd4n7ALhsF0Lzbl6-p99sFogQ6pH44-1a0u2lbDmiHvPhX9qsuMPFNctGE/s1600/SUMPRODUCT3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;180&quot; data-original-width=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0Sq0MAvnvZDdezzlivRFluDzGQ_PLVVZvO5DtLi0Zj4lVyYzmLqmLu4ucW_PTERsV0XvNx-UE5poy4_p0jMd4n7ALhsF0Lzbl6-p99sFogQ6pH44-1a0u2lbDmiHvPhX9qsuMPFNctGE/s1600/SUMPRODUCT3.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
By multiplying the two arrays (A2:A8=&quot;North&quot;) and (B2:B8=&quot;A&quot;) after converting them to 1s and 0s, the result will only be a 1 if both conditions are true (as if either returns 0, we will be multiplying the other by zero).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Incidentally, if we don&#39;t multiply this by the C2:C8 range we can use this as an alternative to COUNTIFS&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;i.e.&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;=SUMPRODUCT(--(A2:A8=&quot;North&quot;),--(B2:B8=&quot;A&quot;))&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;is the same as:&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;=COUNTIFS(A2:A8,&quot;North&quot;,B2:B8,&quot;A&quot;)&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
But why would you want to use this instead of SUMIFS, or COUNTIFS?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Well, SUMPRODUCT is a lot more flexible.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Let&#39;s say we wanted to know total sales value, rather than quantity.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
We can&#39;t do this with SUMIFS without adding a new column (being column C x column D) and applying the formula to that, however with SUMPRODUCT we can just multiply by column D right in the formula:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
=SUMPRODUCT(--(A2:A8=&quot;North&quot;),--(B2:B8=&quot;A&quot;),C2:C8,D2:D8)&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
or let&#39;s say we wanted total sales of product A for North and South:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
=SUMPRODUCT(--(A2:A8=&quot;North&quot;)--(A2:A8=&quot;South&quot;),--(B2:B8=&quot;A&quot;),C2:C8,D2:D8)&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Here we have added the two arrays together (-- is a +)&amp;nbsp;- which will return a 1 if &amp;nbsp;column A is EITHER North or South, as one of the columns will be 1 if this is true whereas if it is not, both columns will be 0.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
These are still pretty simple uses of the function, but hopefully this is enough to illustrate that they can go far beyond the capabilities of SUMIFS and COUNTIFS.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/6864098336403789244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/08/excel-tip-introduction-to-sumproduct.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/6864098336403789244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/6864098336403789244'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/08/excel-tip-introduction-to-sumproduct.html' title='Excel Tip: An introduction to SUMPRODUCT and why you should learn it'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT5HQggZGJS8cKJW3VdqH5t3UN77T6X5bNmlNURHdPULdBtItQuynW430mEik9umhHcqNzD75IljKQlneDWPxghxyFZMihrA1OC4dxPAMMhg_iLcypV8x6rOFCWAv6mX__9Ns8nu1pzpM/s72-c/ThinkingHard.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-4094491134600659155</id><published>2017-04-05T11:29:00.000+01:00</published><updated>2017-04-05T11:33:07.977+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Look out for this when you use PivotTable filters</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDb_yvlAoKGY5WtBQcZIZxrinot7IYGE9WMz_EqkW6eIzS4pNpVZl5k6rRu4h9zEfVciId2xZeCBCTGfAWnQQHp9UzjpQ2WAahmUZGMGf_vN6hWccb-myP0f9sBKPK2dXjtzBv24zscR0/s1600/SlipperyWhenWet.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;211&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDb_yvlAoKGY5WtBQcZIZxrinot7IYGE9WMz_EqkW6eIzS4pNpVZl5k6rRu4h9zEfVciId2xZeCBCTGfAWnQQHp9UzjpQ2WAahmUZGMGf_vN6hWccb-myP0f9sBKPK2dXjtzBv24zscR0/s320/SlipperyWhenWet.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Regular readers and clients will know that I&#39;m a big fan of PivotTables. If you format your data into a table format, you can create all sorts of reports quickly, easily and flexibly using them.&lt;br /&gt;
&lt;br /&gt;
In this (short) post, I want to highlight a little trap to watch out for when you filter a PivotTable - particularly if you are filtering out items, such as blanks for example.&lt;br /&gt;
&lt;br /&gt;
On any of the Row, Column or Report Filter fields you can apply a manual filter by ticking (or unticking) individual entries.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIprey9k2gSJB4UG9L11rtCvboWbV6aJeyu0g-_Iog1NYnFuY3NYlz3XitAgwK7sPnk7roYrptpb96pPibQ_umW1B6edLAePDgQJlQT2Aq31FgDO9i7HEMZU_jjB0e9E07KlzYyDfN8EU/s1600/PivotFilter.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIprey9k2gSJB4UG9L11rtCvboWbV6aJeyu0g-_Iog1NYnFuY3NYlz3XitAgwK7sPnk7roYrptpb96pPibQ_umW1B6edLAePDgQJlQT2Aq31FgDO9i7HEMZU_jjB0e9E07KlzYyDfN8EU/s320/PivotFilter.PNG&quot; width=&quot;218&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In this field I have filtered out the blanks by unticking &quot;(blank)&quot; and leaving everything else ticked. This is exactly the kind of situation that can lead you to fall into the trap.&lt;br /&gt;
&lt;br /&gt;
To understand the problem, you need to think about how a PivotTable works.&lt;br /&gt;
&lt;br /&gt;
The entries in the PivotTable come from the data itself. So this list only includes the Job Descriptions that currently appear in the data (and possibly some that used to, depending on your settings), so the list above may not be comprehensive in future, as new job descriptions appear in the data.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say a new job description of &quot;Clean Fridge Freezer&quot; appears in the data.&lt;br /&gt;
&lt;br /&gt;
Our intention above was to exclude (blank), but Excel doesn&#39;t know this. We could just as easily have meant to only include &quot;Clean Oven&quot;, &quot;Clean Oven and hob&quot;, &quot;Clean Range&quot; and &quot;Clean Range and Fridge Freezer&quot;.&lt;br /&gt;
&lt;br /&gt;
So should &quot;Clean Fridge Freezer&quot; be included in the filter or not? We have not given Excel any clue on this, but Excel needs to do something with it, so there is a default position.&lt;br /&gt;
&lt;br /&gt;
By default, Excel assumes that we have pro-actively ticked the things we want to include - which seems a perfectly reasonable assumption, but if that is true, then &quot;Clean Fridge Freezer&quot; hasn&#39;t been ticked, so should not be included.&lt;br /&gt;
&lt;br /&gt;
In our example where we were essentially &quot;unticking to exclude&quot;, as opposed to &quot;ticking to include&quot;, we need to tell Excel this. Fortunately, this is a simple process.&lt;br /&gt;
&lt;br /&gt;
We just need to change a setting in the Field Settings for this field (Job Description in our example), which can be accessed by right-clicking on the Field itself in the PivotTable (or left-clicking on the field in bottom section of the Field List) and choosing Field Settings.&lt;br /&gt;
&lt;br /&gt;
We then need to tick the box to &quot;Include new items in manual filter&quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvi7EcQG6LgzBlM_Lpcaba7nUo_1xZxFUnkuPK1M_iSSuONX-700i9XeuNFhTTWLpUHGews_em7HLG4QW41ZCN66IrLWfx1c6o4lS8o_lREhq5zeXRPlWD__yrOAyYDy4Ka1HTPSHXPvM/s1600/PivotFilter2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvi7EcQG6LgzBlM_Lpcaba7nUo_1xZxFUnkuPK1M_iSSuONX-700i9XeuNFhTTWLpUHGews_em7HLG4QW41ZCN66IrLWfx1c6o4lS8o_lREhq5zeXRPlWD__yrOAyYDy4Ka1HTPSHXPvM/s320/PivotFilter2.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Once this is ticked, new items will be included by default (just for this field). Note that this setting will not change the selection currently in place, so if you hadn&#39;t ticked it when you set the filter up and only discover this when a new item isn&#39;t included, you will still need to manually tick the new item. However, all future new entries will be automatically ticked.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/4094491134600659155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/04/excel-tip-lookout-for-this-when-you-use.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4094491134600659155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4094491134600659155'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/04/excel-tip-lookout-for-this-when-you-use.html' title='Excel Tip: Look out for this when you use PivotTable filters'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDb_yvlAoKGY5WtBQcZIZxrinot7IYGE9WMz_EqkW6eIzS4pNpVZl5k6rRu4h9zEfVciId2xZeCBCTGfAWnQQHp9UzjpQ2WAahmUZGMGf_vN6hWccb-myP0f9sBKPK2dXjtzBv24zscR0/s72-c/SlipperyWhenWet.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-1483195257818048154</id><published>2017-02-24T11:46:00.001+00:00</published><updated>2017-02-24T11:46:17.658+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Case-sensitive COUNTIFS and SUMIFS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6H30I8tqDp_EvsaN9G0-C9fkviyi1NbWf6pvOBeW-XaeIYQ59pKUFHrg55ILWtxsG2O6b65i0tHWrhhzQer9mKIslTD7GZ3wEv0PUFgnZiyC_Fq6jowOjAA4pvpeBOicTlvEI7GsigV8/s1600/UpperLowerCaseV.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;229&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6H30I8tqDp_EvsaN9G0-C9fkviyi1NbWf6pvOBeW-XaeIYQ59pKUFHrg55ILWtxsG2O6b65i0tHWrhhzQer9mKIslTD7GZ3wEv0PUFgnZiyC_Fq6jowOjAA4pvpeBOicTlvEI7GsigV8/s320/UpperLowerCaseV.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I have covered both &lt;a href=&quot;http://www.notjustnumbers.co.uk/2016/05/excel-tip-adding-up-columns-based-on.html&quot; target=&quot;_blank&quot;&gt;SUMIFS&lt;/a&gt; and &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/09/excel-tip-counting-items-that-meet.html&quot; target=&quot;_blank&quot;&gt;COUNTIFS&lt;/a&gt; in earlier posts.&lt;br /&gt;
&lt;br /&gt;
To recap:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
You can use COUNTIFS to count the instances of a value in a range, e.g.&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
=COUNTIFS(A1:A100,&quot;H&quot;)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
will count how many cells with value &quot;H&quot; there are within the range A1:A100.&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
You can also add additional pairs of criteria, so that&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
=COUNTIFS(A1:A100,&quot;H&quot;,B1:B100,3)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
will count how many cells with value &quot;H&quot; there are within the range A1:A100, where the corresponding value in the range B1:B100 is 3.&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
SUMIFS works in a similar way, but you enter an additional range as the first argument that is summed, e.g.&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
=SUMIFS(C1:C100,A1:A100,&quot;H&quot;,B1:B100,3)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
will sum the entries in column C, where the corresponding entry in column A is &quot;H&quot; and B is 3.&lt;/blockquote&gt;
&lt;br /&gt;
Where these are both very useful functions, one particular flaw is that they are not case-sensitive.&lt;br /&gt;
&lt;br /&gt;
So, there is no difference between&lt;br /&gt;
&lt;br /&gt;
=COUNTIFS(A1:A100,&quot;H&quot;)&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
=COUNTIFS(A1:A100,&quot;h&quot;)&lt;br /&gt;
&lt;br /&gt;
A client recently faced this problem in reporting from a holiday spreadsheet where a full day&#39;s holiday is marked with an &quot;H&quot; and a half-day is marked with a &quot;h&quot;.&lt;br /&gt;
&lt;br /&gt;
The client wished to total the number of days holiday, which if COUNTIFS was case-sensitive, would be as simple as:&lt;br /&gt;
&lt;br /&gt;
=COUNTIFS(A1:A100,&quot;H&quot;)+(0.5*COUNTIFS(A1:A100,&quot;h&quot;))&lt;br /&gt;
&lt;br /&gt;
But unfortunately, we can&#39;t use COUNTIFS at all!&lt;br /&gt;
&lt;br /&gt;
We do have a function in Excel that allows us to compare two values, taking account of case, and that is the EXACT function.&lt;br /&gt;
&lt;br /&gt;
=EXACT(A1,B1)&lt;br /&gt;
&lt;br /&gt;
will return TRUE if A1 is exactly the same as B1, so&lt;br /&gt;
&lt;br /&gt;
=EXACT(&quot;H&quot;,&quot;h&quot;)&lt;br /&gt;
&lt;br /&gt;
would return FALSE.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, we can&#39;t use this with COUNTIFS, because COUNTIFS doesn&#39;t allow us to simply insert a condition, as it requires us to enter the conditions in pairs, as above.&lt;br /&gt;
&lt;br /&gt;
We can, however, use the SUMPRODUCT function, which works with arrays, to apply the EXACT function to a whole array (e.g. A1:A100).&lt;br /&gt;
&lt;br /&gt;
=SUMPRODUCT(EXACT(A1:A100,&quot;H&quot;)*1)&lt;br /&gt;
&lt;br /&gt;
The array EXACT(A1:A100,&quot;H&quot;) will be 100 TRUEs and FALSEs. By multiplying these by 1, they become 1s and 0s. So, this will now calculate the number of capital Hs for us.&lt;br /&gt;
&lt;br /&gt;
To complete our example, we can add this to:&lt;br /&gt;
&lt;br /&gt;
=SUMPRODUCT(EXACT(A1:A100,&quot;h&quot;)*0.5)&lt;br /&gt;
&lt;br /&gt;
Giving us:&lt;br /&gt;
&lt;br /&gt;
=SUMPRODUCT(EXACT(A1:A100,&quot;H&quot;)*1)+SUMPRODUCT(EXACT(A1:A100,&quot;h&quot;)*0.5)&lt;br /&gt;
&lt;br /&gt;
which will return the number of Hs added to half the number of hs, giving us our total of holiday taken.&lt;br /&gt;
&lt;br /&gt;
We can easily add multiple criteria too, as well as change it to the equivalent of SUMIFS.&lt;br /&gt;
&lt;br /&gt;
So,&lt;br /&gt;
&lt;br /&gt;
=COUNTIFS(A1:A100,&quot;H&quot;,B1:B100,3)&lt;br /&gt;
&lt;br /&gt;
can be made case-sensitive by using&lt;br /&gt;
&lt;br /&gt;
=SUMPRODUCT(EXACT(A1:A100,&quot;H&quot;)*1,(B1:B100=3)*1)&lt;br /&gt;
&lt;br /&gt;
as SUMPRODUCT will multiply the resulting arrays of 1s and 0s, so the resulting array will only show a 1 when both conditions are true.&lt;br /&gt;
&lt;br /&gt;
=SUMIFS(C1:C100,A1:A100,&quot;H&quot;,B1:B100,3)&lt;br /&gt;
&lt;br /&gt;
can be made case-sensitive by using&lt;br /&gt;
&lt;br /&gt;
=SUMPRODUCT(EXACT(A1:A100,&quot;H&quot;)*1,(B1:B100=3)*1,C1:C100)&lt;br /&gt;
&lt;br /&gt;
as the we have added the array C1:C100, being the values in column C, which are multiplied by the 1s and 0s&lt;br /&gt;
&lt;br /&gt;
So, say, cell A2 contains &quot;H&quot;, B2 contains 5 and C2 contains 30.&lt;br /&gt;
&lt;br /&gt;
The second position in each of the arrays are as follows:&lt;br /&gt;
&lt;br /&gt;
First array: A2 does exactly equal H so the result is 1&lt;br /&gt;
Second Array: B2 doesn&#39;t equal three so the result is 0&lt;br /&gt;
Third Array: C2 is 30, so the result is 30&lt;br /&gt;
&lt;br /&gt;
The SUMPRODUCT function multiplies these together so that the 2nd position in the resulting array is:&lt;br /&gt;
&lt;br /&gt;
1 x 0 x 30 = 0&lt;br /&gt;
&lt;br /&gt;
And, say, cell A3 contains &quot;H&quot;, B3 contains 3 and C3 contains 15.&lt;br /&gt;
&lt;br /&gt;
The third position in each of the arrays are as follows:&lt;br /&gt;
&lt;br /&gt;
First array: A3 does exactly equal H so the result is 1&lt;br /&gt;
Second Array: B3 does equal three so the result is 1&lt;br /&gt;
Third Array: C3 is 15, so the result is 15&lt;br /&gt;
&lt;br /&gt;
The SUMPRODUCT function multiplies these together so that the 3rd position in the resulting array is:&lt;br /&gt;
&lt;br /&gt;
1 x 1 x 15 = 15&lt;br /&gt;
&lt;br /&gt;
Hopefully you can see that if both conditions are true, we get the value in column C, but if either are false, we are multiplying by zero, so the array that is summed by the SUMPRODUCT function, will only include the values in column C, where the first two conditions are true. This is exactly the same as a SUMIFS, except it is case-sensitive!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/1483195257818048154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/02/excel-tip-case-sensitive-countifs-and.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1483195257818048154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1483195257818048154'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/02/excel-tip-case-sensitive-countifs-and.html' title='Excel Tip: Case-sensitive COUNTIFS and SUMIFS'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6H30I8tqDp_EvsaN9G0-C9fkviyi1NbWf6pvOBeW-XaeIYQ59pKUFHrg55ILWtxsG2O6b65i0tHWrhhzQer9mKIslTD7GZ3wEv0PUFgnZiyC_Fq6jowOjAA4pvpeBOicTlvEI7GsigV8/s72-c/UpperLowerCaseV.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-5402867543515509294</id><published>2017-01-27T15:27:00.000+00:00</published><updated>2017-01-27T15:27:09.584+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Printing"/><title type='text'>Excel Tip: Setting the print area and page breaks</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEina988DgMhxf6B1KZH-iHhcd-lqIhiFTinG_1UsKj1bfuk2wAR8SUbCNaR0M4W4Kk39_f8fVJN9LD2GVzaMJqlcEeUs85kfYSUpiBQx4cuEAPBEpKoTrEOAOoxPNE7qDgIObC3IZA_sUI/s1600/Printing.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEina988DgMhxf6B1KZH-iHhcd-lqIhiFTinG_1UsKj1bfuk2wAR8SUbCNaR0M4W4Kk39_f8fVJN9LD2GVzaMJqlcEeUs85kfYSUpiBQx4cuEAPBEpKoTrEOAOoxPNE7qDgIObC3IZA_sUI/s320/Printing.jpg&quot; width=&quot;285&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In this post I want to touch on a topic that I&#39;ve not written a lot about on this blog - printing.&lt;br /&gt;
&lt;br /&gt;
There are many settings in Excel that you can use to influence what is printed, and I&#39;m sure I will revisit this topic to cover some more of them soon.&lt;br /&gt;
&lt;br /&gt;
In this post, I simply want to focus on how to determine how a single worksheet appears on paper, when you click the Print button.&lt;br /&gt;
&lt;br /&gt;
This is essentially driven by two elements:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The Print Area - which determines what section of the sheet is printed&lt;/li&gt;
&lt;li&gt;The Page Breaks - which determine how this is spread across the physical pages printed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Print Area&lt;/h3&gt;
&lt;div&gt;
By default, the print area will be what is know as the Used Range of the worksheet. This is from cell A1 to the column of the rightmost cell with anything in it to the row of the cell furthest down the worksheet with anything in it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This, however, can be changed by highlighting the range that you want as your Print Area and selecting Print Area, Set Print Area from the Page Layout ribbon.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If everything you want to print is not adjacent to each other, you can select multiple ranges by holding the Control key while you select them.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can even set the Print Area as a dynamic range, but we&#39;ll leave that for a future post.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Page Breaks&lt;/h3&gt;
&lt;div&gt;
Excel breaks up the Print Area based upon the settings on the Page Layout ribbon.&lt;br /&gt;
&lt;br /&gt;
Here, you can set the page orientation, paper size, margins, etc. as well as set the scale, or more usefully, set the number of pages wide the Print Area should be considered to be and how many pages long (using the Width and Height settings).&lt;br /&gt;
&lt;br /&gt;
These Width and Height settings are, by default, set to automatic, meaning that they will be determined by the page size and orientation, along with the scale set beneath them.&lt;br /&gt;
&lt;br /&gt;
You can, however, fix them so that, for example, the whole Print Area is resized to fit on 1 page wide and 1 page tall (by setting them both to 1). Obviously, with that setting, there will be no page breaks.&lt;br /&gt;
&lt;br /&gt;
Another typical setting is to set the width to 1 but leave the height as automatic. This will resize so that it is always only 1 page wide, but will insert as many page breaks as required for the height.&lt;br /&gt;
&lt;br /&gt;
Most of the time, this is all you need to determine your page breaks, however, there are also times where you want the breaks to happen in specific places. You can preview where they are and move them around using Page Break Preview.&lt;br /&gt;
&lt;br /&gt;
This is accessed from the View ribbon and shows blue lines where the page breaks are and a watermark telling you the page numbers. These blue lines can be dragged to wherever you need them.&lt;br /&gt;
&lt;br /&gt;
That&#39;s about it, and the good thing is that all of these settings stay with the sheet, so you should only need to set them once unless the layout of the sheet changes.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/5402867543515509294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2017/01/excel-tip-setting-print-area-and-page.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/5402867543515509294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/5402867543515509294'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2017/01/excel-tip-setting-print-area-and-page.html' title='Excel Tip: Setting the print area and page breaks'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEina988DgMhxf6B1KZH-iHhcd-lqIhiFTinG_1UsKj1bfuk2wAR8SUbCNaR0M4W4Kk39_f8fVJN9LD2GVzaMJqlcEeUs85kfYSUpiBQx4cuEAPBEpKoTrEOAOoxPNE7qDgIObC3IZA_sUI/s72-c/Printing.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-8601540577779633675</id><published>2016-12-23T17:04:00.003+00:00</published><updated>2016-12-23T17:04:54.994+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Ensuring that dropdown lists start at the top (and Merry Christmas)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIupUOx-llQhc4ZQ8lYr4R_m5BDysE1FULN9a3Aa-aJqrFIn5uaY4FkN7vw__MGHN3glaAht2MPjRiDlFwkuHYPy6BaH2q-zwNKKhBgfp7fmmjEKa6zL4M52mW8U3B7hrZbFTGGhDSLeA/s1600/SantaUsingExcel.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIupUOx-llQhc4ZQ8lYr4R_m5BDysE1FULN9a3Aa-aJqrFIn5uaY4FkN7vw__MGHN3glaAht2MPjRiDlFwkuHYPy6BaH2q-zwNKKhBgfp7fmmjEKa6zL4M52mW8U3B7hrZbFTGGhDSLeA/s320/SantaUsingExcel.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Before I start this post, I must first apologise for the lack of posts over recent months. After returning from my summer holidays, my workload hasn&#39;t really eased (which isn&#39;t a bad thing), and my blogging has suffered.&lt;br /&gt;
&lt;br /&gt;
I wanted to get an (albeit short) tip up before Christmas, though, and it is one of my New Year resolutions to post at least once a month in 2017.&lt;br /&gt;
&lt;br /&gt;
Your Christmas tip then is a simple answer to a particularly annoying aspect of data validation &lt;a href=&quot;http://www.notjustnumbers.co.uk/2009/06/excel-tip-dropdown-boxes-in-microsoft.html&quot; target=&quot;_blank&quot;&gt;dropdown boxes&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A feature of data validation drodpown lists in Excel is that if the cell already contains a value from the list, the dropdown starts with that value selected, and you need to scroll up if you want to select an earlier value.&lt;br /&gt;
&lt;br /&gt;
This is normally fine except for the following (very common) scenario.&lt;br /&gt;
&lt;br /&gt;
It is good practice to have the dropdown list look at a range where its entries can be edited, and to leave space at the bottom of the list to allow the list to be added to.&lt;br /&gt;
&lt;br /&gt;
However, a side-effect of this is that, when your cell is empty, the dropdown will start at the bottom of the list, as it sees the empty cells at the bottom as a match for the current entry (nothing).&lt;br /&gt;
&lt;br /&gt;
The simplest answer I have found to this is to have a blank cell at the top of the list as well. As this matching feature matches the first match it finds, your dropdown list will now start at the top (for an empty cell).&lt;br /&gt;
&lt;br /&gt;
I often find the neatest way to do this is to have a blank row under the headers that doesn&#39;t look like part of the list:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZXCFxAUqAVc_85Csbgh0KPf8NtwlGMTTGw11yr9aYXLxmvHVCVu07nOAyxjs1FZSwOLOjXTuoIUHT4LujYSmB8_R7ofiQ4pSyn_72E_hUA00pbHdy84O3qzVF212nt36c6O6PCWjDqu4/s1600/ReindeerList.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZXCFxAUqAVc_85Csbgh0KPf8NtwlGMTTGw11yr9aYXLxmvHVCVu07nOAyxjs1FZSwOLOjXTuoIUHT4LujYSmB8_R7ofiQ4pSyn_72E_hUA00pbHdy84O3qzVF212nt36c6O6PCWjDqu4/s320/ReindeerList.PNG&quot; width=&quot;237&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In the example above, we could use the range A2:A14 to drive the dropdown list and cell A2 would be the first match for a blank cell, rather than A12.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
That&#39;s it for now, and 2016! May you and your family have a great, safe and Merry Christmas (or whatever holiday you celebrate) and a fantastic 2017.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/8601540577779633675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/12/excel-tip-ensuring-that-dropdown-lists.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/8601540577779633675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/8601540577779633675'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/12/excel-tip-ensuring-that-dropdown-lists.html' title='Excel Tip: Ensuring that dropdown lists start at the top (and Merry Christmas)'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIupUOx-llQhc4ZQ8lYr4R_m5BDysE1FULN9a3Aa-aJqrFIn5uaY4FkN7vw__MGHN3glaAht2MPjRiDlFwkuHYPy6BaH2q-zwNKKhBgfp7fmmjEKa6zL4M52mW8U3B7hrZbFTGGhDSLeA/s72-c/SantaUsingExcel.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-3210446134271804122</id><published>2016-08-09T03:00:00.000+01:00</published><updated>2016-08-09T03:00:31.170+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Using Logic in Excel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC2-eIam1k4XyESMoC8Go7DnYk75zZjORxvQoiWxWVtd70RulZDHaKaedeZx6GCMF8lK1HhA9gVQMXWgl0EIdwGohLui8XFcic7wpOfU-lK0sEjFWpvW-ra1ni1HNr-kenkFHZrxE-o8w/s1600/FlowChart.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;271&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC2-eIam1k4XyESMoC8Go7DnYk75zZjORxvQoiWxWVtd70RulZDHaKaedeZx6GCMF8lK1HhA9gVQMXWgl0EIdwGohLui8XFcic7wpOfU-lK0sEjFWpvW-ra1ni1HNr-kenkFHZrxE-o8w/s320/FlowChart.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Logic (particularly Boolean Logic) plays a huge rule in computer programming and circuitry, but is also very useful in Excel.&lt;br /&gt;
&lt;br /&gt;
It is fundamental to the &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/10/excel-tip-if-statement-made-simple.html&quot; target=&quot;_blank&quot;&gt;IF statement&lt;/a&gt; which in itself is such an important tool in Excel, but has many other roles.&lt;br /&gt;
&lt;br /&gt;
Essentially, when we talk about logic in this context, we are talking about expressions that can either be true or false, e.g.&lt;br /&gt;
&lt;br /&gt;
A1=100&lt;br /&gt;
B5&amp;lt;=34&lt;br /&gt;
C2=&quot;Yes&quot;&lt;br /&gt;
&lt;br /&gt;
You can simply type the expression as a formula in a cell putting an &quot;=&quot; in front of it, so if you enter:&lt;br /&gt;
&lt;br /&gt;
=A1=100&lt;br /&gt;
&lt;br /&gt;
into, say, cell B1, then cell B1 will show the word TRUE if A1 is 100 and the word FALSE otherwise.&lt;br /&gt;
&lt;br /&gt;
As mentioned earlier, one of the more common places to use these expressions is in an IF statement, which works as follows:&lt;br /&gt;
&lt;br /&gt;
=IF(expression,value to return if expression is TRUE,value to return if expression is FALSE)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
=IF(A1=100,&quot;Yes&quot;,&quot;No&quot;)&lt;br /&gt;
&lt;br /&gt;
will return Yes if A1 is 100 and No if not.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Some logical functions&lt;/b&gt;&lt;br /&gt;
There are a few logical functions which extend the possibilities, in particular we will look at NOT, AND and OR.&lt;br /&gt;
&lt;br /&gt;
NOT reverses the result of a logical expression.&lt;br /&gt;
&lt;br /&gt;
If&lt;br /&gt;
&lt;br /&gt;
=A1=100&lt;br /&gt;
&lt;br /&gt;
returns TRUE, then&lt;br /&gt;
&lt;br /&gt;
=NOT(A1=100)&lt;br /&gt;
&lt;br /&gt;
returns FALSE, and vice versa.&lt;br /&gt;
&lt;br /&gt;
AND allows you to list multiple expressions and returns TRUE only if ALL of the expressions would individually return TRUE. Otherwise it returns FALSE.&lt;br /&gt;
&lt;br /&gt;
OR works the same but returns TRUE if ANY of the expressions are TRUE.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
=AND(A1=100,B5&amp;lt;=34,C2=&quot;Yes&quot;)&lt;br /&gt;
&lt;br /&gt;
will only return TRUE, if all three of those statements are TRUE.&lt;br /&gt;
&lt;br /&gt;
Whereas:&lt;br /&gt;
&lt;br /&gt;
=OR(A1=100,B5&amp;lt;=34,C2=&quot;Yes&quot;)&lt;br /&gt;
&lt;br /&gt;
will return TRUE if any of the three conditions are TRUE.&lt;br /&gt;
&lt;br /&gt;
By using this type of logical expression, particularly within an IF statement, or &amp;nbsp;a Conditional Formatting condition, we can control how a spreadsheet both looks and calculates based upon the content of cells.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/3210446134271804122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/08/excel-tip-using-logic-in-excel.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3210446134271804122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3210446134271804122'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/08/excel-tip-using-logic-in-excel.html' title='Excel Tip: Using Logic in Excel'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC2-eIam1k4XyESMoC8Go7DnYk75zZjORxvQoiWxWVtd70RulZDHaKaedeZx6GCMF8lK1HhA9gVQMXWgl0EIdwGohLui8XFcic7wpOfU-lK0sEjFWpvW-ra1ni1HNr-kenkFHZrxE-o8w/s72-c/FlowChart.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-3491544019260956699</id><published>2016-07-05T03:00:00.000+01:00</published><updated>2016-07-05T03:00:07.023+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Ranking numbers in Excel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHGVhyphenhyphenG_2qfdGcnc5bID9VzTpelR3GAPKT0gx5g3t3vaT1IVSeS4uyMtwmTCflrRV6ExF-pWehkNT8yEOA518EY1dmj2QX4SW2aKPnVj07zs1VHQQL-Bbc-jHGwWkgF6FbG-IVn8Dl740/s1600/Rank.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHGVhyphenhyphenG_2qfdGcnc5bID9VzTpelR3GAPKT0gx5g3t3vaT1IVSeS4uyMtwmTCflrRV6ExF-pWehkNT8yEOA518EY1dmj2QX4SW2aKPnVj07zs1VHQQL-Bbc-jHGwWkgF6FbG-IVn8Dl740/s320/Rank.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Before I start, a couple of announcements.&lt;br /&gt;
&lt;br /&gt;
First of all, please accept my apologies for the time between posts. A combination of workload and a family bereavement have slowed me down somewhat!&lt;br /&gt;
&lt;br /&gt;
Secondly, if any of you will be in and around London tomorrow (Wednesday) night, the ICAEW are launching their Spreadsheet Competency Framework, with some top speakers from the world of Excel. This document (as suggested by its name) is intended to provide a framework to assess spreadsheet competency, and was developed by the Institute&#39;s Excel Community Advisory Committee, of which I am a member. The event is free to attend, and further details can be found at:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.icaew.com/en/technical/information-technology/it-faculty/it-faculty-events&quot;&gt;http://www.icaew.com/en/technical/information-technology/it-faculty/it-faculty-events&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I hope to see you there.&lt;br /&gt;
&lt;br /&gt;
Right...on with the post.&lt;br /&gt;
&lt;br /&gt;
There are many reasons, you might want to rank a list of numbers in Excel. One I do quite often, is produce a league table. By calculating the ranking of a number and then using lookups to populate a table in rank order, we can easily produce a league table, like the example below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPKxs5619ASG13m-mdyYNlsD441in_McIwXRKqnJ0RqmjzbYP_DDcEBvtNGvVnNAiLwpQpcvdaV1dgpeOoSD0FK3489R0aHZhn6bVPl7kwMth8EJQB4lSk7tTyDBP_mf4QTpzIEP1CPiU/s1600/RankExample1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPKxs5619ASG13m-mdyYNlsD441in_McIwXRKqnJ0RqmjzbYP_DDcEBvtNGvVnNAiLwpQpcvdaV1dgpeOoSD0FK3489R0aHZhn6bVPl7kwMth8EJQB4lSk7tTyDBP_mf4QTpzIEP1CPiU/s320/RankExample1.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The first Rank column is the one we are trying to populate here.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In Excel 2010 onwards we will use the RANK.EQ function, which replaces the RANK function in Excel 2007 and before. Both functions work exactly the same, and both exist in Excel 2010 to 2016, at least. If you know you may have users using Excel 2007 or earlier, use the RANK function - otherwise use RANK.EQ to future-proof your spreadsheet.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The RANK.EQ (or indeed the RANK) function&#39;s syntax is as follows:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=RANK.EQ(number,ref,[order])&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
where:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
number is the number we want to know the rank of&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ref is the whole range of numbers&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
order is an optional argument, which determines the order that the numbers should be ranked in. If this argument is zero, or omitted, the numbers are ranked in descending order (the largest number is ranked 1), whereas if this is 1 (or any non-zero value), the numbers are ranked in ascending order.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Where two numbers in the range are the same, they are both given the highest rank (when using the RANK.EQ function - there is a similar RANK.AVG function that gives them their average rank).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In our example the numbers 30,45,97, etc. are in the range B3:B12, so we would use the RANK.EQ function in cells C3:C12. In cell C3, we would enter:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=RANK.EQ($B3,$B$3:$B$12)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Notice that we have fixed all of the references (using the dollar signs) on the B3:B12 range, to ensure that this range stays fixed when we copy it down, but just the column on the B3 reference so that the row (and the number we rank) changes as we copy down.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If we use this function as it is, we will run into a problem, though. As there are two number 24s in our range, we get the following:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX1m3jTUcM9MPqnSzEO6LPB7LQMTevrWckJY9BwAXUmMzu99XEBWugpek19hM4i3c1kl4dDocRAC7k7-Xt63FszX_DAl7ve9F9cTsWgqRGHIfDkv4Lm2WqoPaxzR1IwyEWPY8HXqEMuEE/s1600/RankExample2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX1m3jTUcM9MPqnSzEO6LPB7LQMTevrWckJY9BwAXUmMzu99XEBWugpek19hM4i3c1kl4dDocRAC7k7-Xt63FszX_DAl7ve9F9cTsWgqRGHIfDkv4Lm2WqoPaxzR1IwyEWPY8HXqEMuEE/s320/RankExample2.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Notice that both 24s are ranked 8 (the highest rank), which means there is no rank 9 - hence our error in the league table when we try to look up 9. We need each rank to be unique for our league table to work.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We will need to use another formula to address this, and we can use &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/09/excel-tip-counting-items-that-meet.html&quot; target=&quot;_blank&quot;&gt;COUNTIFS&lt;/a&gt;&amp;nbsp;to count how many instances have occurred so far in the list.and if this is greater than 1, to add the difference to the rank. Our formula becomes:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=RANK.EQ($B3,$B$3:$B$12)+COUNTIFS($B$3:$B3,$B3)-1&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Notice that in the criteria range B3:B3, I have fixed the row on the start of the range and left it flexible on the end, so when our formula is copied down, we are always counting the instances from the top of the column to the current row. By the end of the range, our formula is:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=RANK.EQ($B12,$B$3:$B$12)+COUNTIFS($B$3:$B12,$B12)-1&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
On the first 24, our RANK.EQ function returns 8 as before, and our COUNTIFS counts that there is 1 24 so far, so:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
8+1-1 = 8&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
On the second 24, our RANK.EQ function again returns 8, but our COUNTIFS now counts that there are two 24s so far, so:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
8+2-1 = 9&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
thereby giving us the result we required:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1SYGH1c-MxB2FU4wCD1oo6u3dUNAhJVFynAfq3_xjVQ2EDAwLy9khwuxl-_f3mC5ZmfNXS-oUlKqaxfL60tOXELtR0NL4eEVGybJMBr_j-45dHxNRlkX1pfJY1c6XtibdtWUrQ6m1gHs/s1600/RankExample1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1SYGH1c-MxB2FU4wCD1oo6u3dUNAhJVFynAfq3_xjVQ2EDAwLy9khwuxl-_f3mC5ZmfNXS-oUlKqaxfL60tOXELtR0NL4eEVGybJMBr_j-45dHxNRlkX1pfJY1c6XtibdtWUrQ6m1gHs/s320/RankExample1.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The league table was created by entering the numbers 1 to 10 in the first column and using &lt;a href=&quot;http://www.notjustnumbers.co.uk/2013/03/excel-tip-index-and-match-alternative.html&quot; target=&quot;_blank&quot;&gt;INDEX and MATCH&lt;/a&gt; to return the number at that rank from the first table.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The INDEX/MATCH function on the first row (row 3) was:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=INDEX($B$3:$B$12,MATCH($E3,$C$3:$C$12,0))&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If you did not understand the COUNTIFS or INDEX/MATCH functions, please visit these earlier posts:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/09/excel-tip-counting-items-that-meet.html&quot; target=&quot;_blank&quot;&gt;Excel Tip: Counting items that meet certain criteria&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://www.notjustnumbers.co.uk/2013/03/excel-tip-index-and-match-alternative.html&quot; target=&quot;_blank&quot;&gt;Excel Tip: INDEX and MATCH - an alternative to VLOOKUP (and HLOOKUP)&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/3491544019260956699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/07/excel-tip-ranking-numbers-in-excel.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3491544019260956699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3491544019260956699'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/07/excel-tip-ranking-numbers-in-excel.html' title='Excel Tip: Ranking numbers in Excel'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHGVhyphenhyphenG_2qfdGcnc5bID9VzTpelR3GAPKT0gx5g3t3vaT1IVSeS4uyMtwmTCflrRV6ExF-pWehkNT8yEOA518EY1dmj2QX4SW2aKPnVj07zs1VHQQL-Bbc-jHGwWkgF6FbG-IVn8Dl740/s72-c/Rank.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-2741497240015658241</id><published>2016-05-10T03:00:00.000+01:00</published><updated>2016-05-10T03:00:08.752+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Adding up columns based on multiple criteria (the SUMIFS function)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3NeSUTOKQCzGhICB9f-MVBsoIUkF3yQeYw5C3ML28Iq9eFeiDGcYuJ-Mz1e5mKq0y9vDVIqXSA4iCUqFt05Xea4n_YojESZUi2DggLTCQIX363jGj5lfEGn6YOeb5yxCoFKJ2gjqplc/s1600/SUMIFS.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3NeSUTOKQCzGhICB9f-MVBsoIUkF3yQeYw5C3ML28Iq9eFeiDGcYuJ-Mz1e5mKq0y9vDVIqXSA4iCUqFt05Xea4n_YojESZUi2DggLTCQIX363jGj5lfEGn6YOeb5yxCoFKJ2gjqplc/s320/SUMIFS.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Before getting into today&#39;s post I want to point you to an excellent free Webinar being offered (for a limited time) by Mynda Treacy, entitled &quot;&lt;a href=&quot;http://www.mothresource.com/147-28-1-46.html&quot; target=&quot;_blank&quot;&gt;Creating Excel Dashboards&lt;/a&gt;&quot;. Mynda is a real expert on Excel Dashboards and her training materials are always excellent. You can register for the webinar &lt;a href=&quot;http://www.mothresource.com/147-28-1-46.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I realised the other day that I had never covered one of my most used functions on this blog - SUMIFS. I have covered its predecessor, &lt;a href=&quot;http://www.notjustnumbers.co.uk/2011/07/excel-tip-using-sumif-function-to.html&quot; target=&quot;_blank&quot;&gt;SUMIF&lt;/a&gt;, as SUMIFS has only been available since Excel 2007.&lt;br /&gt;
&lt;br /&gt;
Although SUMIF is still available in later versions of Excel for compatibility purposes, it is essentially redundant, as SUMIFS does the same thing, plus a lot more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGOiEaO6P33N9hKupsLHSsqRuRZCYuGqU0HpuQN78bXuuQiCmGaKV0FH1ZlajdIh6mX_MBgDOL00vjLrgvEb2O2gMyT8MEARlaSs5F-K0jFVH5lrqr3nfnhDY_Mr-YXp779ZOLo_1uKY0/s1600/SUMIFSTable.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGOiEaO6P33N9hKupsLHSsqRuRZCYuGqU0HpuQN78bXuuQiCmGaKV0FH1ZlajdIh6mX_MBgDOL00vjLrgvEb2O2gMyT8MEARlaSs5F-K0jFVH5lrqr3nfnhDY_Mr-YXp779ZOLo_1uKY0/s320/SUMIFSTable.PNG&quot; width=&quot;233&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Let us look at an example of some sales data (see left).&lt;br /&gt;
&lt;br /&gt;
Say we want to know how much Mary&#39;s sales were, or how much Sarah sold in the East Region, or even how much Ben sold in the North region in the month of January.&lt;br /&gt;
&lt;br /&gt;
SUMIFS can do all of these.&lt;br /&gt;
&lt;br /&gt;
The syntax for SUMIFS is as follows:&lt;br /&gt;
&lt;br /&gt;
=SUMIFS(SumRange,CriteriaRange1,Criteria1,[CriteriaRange2],[Criteria2].....)&lt;br /&gt;
&lt;br /&gt;
You can have as many pairs of CriteriaRange and Criteria as you need. The function works as follows:&lt;br /&gt;
&lt;br /&gt;
SUM SumRange where CriteriaRange1 = Criteria1 and CriteriaRange2 = Criteria2 etc. for however many criteria you have.&lt;br /&gt;
&lt;br /&gt;
For all of the examples above the SumRange will be D2:D21, as this is the range we want to sum, subject to our criteria. We will look at how we construct the rest of the formula for each of our examples above.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How much did Mary sell?&lt;/b&gt;&lt;br /&gt;
Here we only have one criteria:&lt;br /&gt;
&lt;br /&gt;
CriteriaRange1 = C2:C21&lt;br /&gt;
Criteria1 = &quot;Mary&quot;&lt;br /&gt;
&lt;br /&gt;
=SUMIFS(D2:D21,C2:C21,&quot;Mary&quot;)&lt;br /&gt;
&lt;br /&gt;
returns £16,853.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;How much did Sarah sell in the East Region?&lt;/b&gt;&lt;br /&gt;
This time we have two criteria:&lt;br /&gt;
&lt;br /&gt;
CriteriaRange1 = C2:C21&lt;br /&gt;
Criteria1 = &quot;Sarah&quot;&lt;br /&gt;
&lt;br /&gt;
CriteriaRange2 = B2:B21&lt;br /&gt;
Criteria2 = &quot;East&quot;&lt;br /&gt;
&lt;br /&gt;
=SUMIFS(D2:D21,C2:C21,&quot;Sarah&quot;,B2:B21,&quot;East&quot;)&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
returns £1,085.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How much did Ben sell in the North Region in the month of January?&lt;/b&gt;&lt;br /&gt;
This time we actually have four criteria:&lt;br /&gt;
&lt;br /&gt;
CriteriaRange1 = C2:C21&lt;br /&gt;
Criteria1 = &quot;Ben&quot;&lt;br /&gt;
&lt;br /&gt;
CriteriaRange2 = B2:B21&lt;br /&gt;
Criteria2 = &quot;North&quot;&lt;br /&gt;
&lt;br /&gt;
CriteriaRange3 = A2:A21&lt;br /&gt;
Criteria3 = &quot;&amp;gt;=&quot;&amp;amp;DATE(2016,1,1)&lt;br /&gt;
&lt;br /&gt;
CriteriaRange4 = A2:A21&lt;br /&gt;
Criteria4 = &quot;&amp;lt;=&quot;&amp;amp;DATE(2016,1,31)&lt;br /&gt;
&lt;br /&gt;
There are two elements to these last two criteria that need further explanation.&lt;br /&gt;
&lt;br /&gt;
The first is that if our criteria is anything other than equals, we need to include the criteria in inverted commas, for example &quot;&amp;gt;23&quot;, or &quot;&amp;lt;=15&quot;, to make it a string. If rather than 23, we wished to refer to a cell (say G5) we can use the ampersand (&amp;amp;) to join two strings together, e.g. &quot;&amp;gt;&quot;&amp;amp;G5.&lt;br /&gt;
&lt;br /&gt;
The second is that if we wish to refer to a date directly, we need to refer its sequential number which we can calculate using the DATE function. The three arguments for the DATE function are Year, Month and Day, so to get the date sequence number for 1st January 2016, we can use DATE(2016,1,1). Note that if we entered 1/1/2016 in cell G5, we could just use &quot;&amp;gt;=&quot;&amp;amp;G5 for Criteria3, as the cell value when you enter a date, is its date sequence value.&lt;br /&gt;
&lt;br /&gt;
Our function is therefore:&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
=SUMIFS(D2:D21,C2:C21,&quot;Ben&quot;,B2:B21,&quot;North&quot;,A2:A21,&quot;&amp;gt;=&quot;&amp;amp;DATE(2016,1,1),A2:A21,&quot;&amp;lt;=&quot;&amp;amp;DATE(2016,1,31))&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
which returns £4,007.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In most real situations we are likely to have all of the criteria in other cells, as we are usually doing more than one calculation.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With careful planning and smart use of &lt;a href=&quot;http://www.notjustnumbers.co.uk/2011/05/excel-tip-dollar-sign-in-formula-fixing.html&quot; target=&quot;_blank&quot;&gt;dollar signs&lt;/a&gt;, you can structure your formula so that you only need to write it once. For example if we wish to populate the following grid from our data:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoBSDe769M9gDkn4w1GUlSsgy6gob0297QOFtCWe85CTj-uWQYYihV3Zw2rPYfaFGpsZi-mlt91vyjZWZlpMGRsR1Kk0Zq7t5zYhNtrwQ9uYghcmibERjVDgudnVaQ3Zk3gaFd7M-gX6E/s1600/SUMIFSTable2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoBSDe769M9gDkn4w1GUlSsgy6gob0297QOFtCWe85CTj-uWQYYihV3Zw2rPYfaFGpsZi-mlt91vyjZWZlpMGRsR1Kk0Zq7t5zYhNtrwQ9uYghcmibERjVDgudnVaQ3Zk3gaFd7M-gX6E/s320/SUMIFSTable2.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If we put the following function in cell J2, we &amp;nbsp;can copy it to all of the other cells:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
=SUMIFS($D$2:$D$21,$C$2:$C$21,$I2,$B$2:$B$21,J$1)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We have used dollars to fix both the rows and columns of the references to the data table, as these should not change, no matter what cell that we are in.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For our criteria however, we want those to change between cells, so we have fixed the column of our name criteria ($I2), as we are always going to look to column I for the name, but want it to change as we change rows. Similarly, we have fixed the row of our region criteria (J$1), as we always want to look at row 1, but want it to change with the columns.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hopefully this gives you an idea how flexible SUMIFS can be.&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/2741497240015658241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/05/excel-tip-adding-up-columns-based-on.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/2741497240015658241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/2741497240015658241'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/05/excel-tip-adding-up-columns-based-on.html' title='Excel Tip: Adding up columns based on multiple criteria (the SUMIFS function)'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3NeSUTOKQCzGhICB9f-MVBsoIUkF3yQeYw5C3ML28Iq9eFeiDGcYuJ-Mz1e5mKq0y9vDVIqXSA4iCUqFt05Xea4n_YojESZUi2DggLTCQIX363jGj5lfEGn6YOeb5yxCoFKJ2gjqplc/s72-c/SUMIFS.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-4207698506289348090</id><published>2016-04-05T03:00:00.000+01:00</published><updated>2016-04-05T03:00:33.828+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>ICAEW Spreadsheet Capability Framework - your opinions?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikfB7KIdZVxK9zzwwtTK9SoRrkt4vE0h-YqTH5BWlmT8SZp_PsAZyXLBoWDDMiYWB8-t-VL1XGWtIvoL7Gwvm2opNp9iG9sw3IdjqgsVajWiyDUSPLyLaRYGmAPvjC1x5gk800h2BmGHI/s1600/Capability.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikfB7KIdZVxK9zzwwtTK9SoRrkt4vE0h-YqTH5BWlmT8SZp_PsAZyXLBoWDDMiYWB8-t-VL1XGWtIvoL7Gwvm2opNp9iG9sw3IdjqgsVajWiyDUSPLyLaRYGmAPvjC1x5gk800h2BmGHI/s320/Capability.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
As you may be aware, I am a member of the Institute of Chartered Accountants in England and Wales (ICAEW) Excel Community Advisory Committee.&lt;br /&gt;
&lt;br /&gt;
An important piece of work that the committee has been working on is what we are (currently) calling the Spreadsheet Capability Framework.&lt;br /&gt;
&lt;br /&gt;
This document is intended to provide a reference point that spreadsheet users, employers and job applicants can use to discuss and assess competence in spreadsheet use - beyond glib phrases on a CV, such as &quot;proficient with Excel&quot;.&lt;br /&gt;
&lt;br /&gt;
Given the authorship of the framework, it is obviously primarily aimed at those in the finance field, so apologies to my non-accountant readers.&lt;br /&gt;
&lt;br /&gt;
The framework has now reached the stage where we are actively seeking opinions outside the committee.&lt;br /&gt;
&lt;br /&gt;
To this end my colleague, David Lyford-Smith has posted a copy of the document to the ICAEW&#39;s IT-Counts website, where your comments would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
If you would like to read the framework document and/or add your opinions to the debate, please use the following link:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.ion.icaew.com/itcounts/post/Spreadsheet-Capability-Framework---exposure-draft-seeking-your-comments&quot;&gt;http://www.ion.icaew.com/itcounts/post/Spreadsheet-Capability-Framework---exposure-draft-seeking-your-comments&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Whereas comments on my blog are always welcome, and will be passed on, I would recommend commenting on the IT Counts post instead to contribute to the wider debate.&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/4207698506289348090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/04/icaew-spreadsheet-capability-framework.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4207698506289348090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4207698506289348090'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/04/icaew-spreadsheet-capability-framework.html' title='ICAEW Spreadsheet Capability Framework - your opinions?'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikfB7KIdZVxK9zzwwtTK9SoRrkt4vE0h-YqTH5BWlmT8SZp_PsAZyXLBoWDDMiYWB8-t-VL1XGWtIvoL7Gwvm2opNp9iG9sw3IdjqgsVajWiyDUSPLyLaRYGmAPvjC1x5gk800h2BmGHI/s72-c/Capability.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-3014519860282512978</id><published>2016-03-08T03:00:00.000+00:00</published><updated>2016-03-08T03:00:16.963+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Using Index to calculate a cumulative sum (e.g. a Year to Date total)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbZDBlvghEln0KtNZHunE_E8NkstEShDIA3BDSUkA4yW8ev-CNzbdFYfX3mKS4w1dvEdq9lsQwtSJn77JuVnMVwb8NofiRnD4obE-nPSoG2dmUO13sbQeB74qpoVCEc7uTR-PkbXKgNI/s1600/Cumulative.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbZDBlvghEln0KtNZHunE_E8NkstEShDIA3BDSUkA4yW8ev-CNzbdFYfX3mKS4w1dvEdq9lsQwtSJn77JuVnMVwb8NofiRnD4obE-nPSoG2dmUO13sbQeB74qpoVCEc7uTR-PkbXKgNI/s320/Cumulative.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Let me start with an apology. My current workload has meant that my posts have been a lot less frequent in recent weeks. This may continue for a while, but I will still be aiming to post at least once a month during this busy spell.&lt;br /&gt;
&lt;br /&gt;
In this post I want to show you how to do something I have shown before using &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/02/using-offset-function-in-microsoft.html&quot; target=&quot;_blank&quot;&gt;OFFSET&lt;/a&gt;, but this time using the more efficient INDEX.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s look at the example of a 12 month budget spreadsheet with the monthly sales figures in cells B9 to M9 (month 1 in B9, Month 2 in C9, etc.). And let&#39;s say that the current month number is entered in cell B6.&lt;br /&gt;
&lt;br /&gt;
Using OFFSET we could return the current month&#39;s sales using:&lt;br /&gt;
&lt;br /&gt;
=OFFSET($B9,0,$B$6-1)&lt;br /&gt;
&lt;br /&gt;
and the cumulative sales using:&lt;br /&gt;
&lt;br /&gt;
=SUM(OFFSET($B9,0,0,1,$B$6))&lt;br /&gt;
&lt;br /&gt;
See &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/02/using-offset-function-in-microsoft.html&quot; target=&quot;_blank&quot;&gt;this earlier post&lt;/a&gt;, if you don&#39;t understand why.&lt;br /&gt;
&lt;br /&gt;
The problem with OFFSET though, is that it is what is known as a &quot;volatile&quot; function. This means that it always has to be recalculated when any cell in the spreadsheet changes - as it does not specify a range that it is dependent on, therefore does not know whether a change might affect its result.&lt;br /&gt;
&lt;br /&gt;
INDEX however looks at a defined range, making it significantly more efficient, and in its simplest form can be used to replace both of these examples of OFFSET.&lt;br /&gt;
&lt;br /&gt;
For a range the width of a single cell (as in our example), INDEX only needs two arguments to return the current month&#39;s sales:&lt;br /&gt;
&lt;br /&gt;
=INDEX($B9:$M9,$B$6)&lt;br /&gt;
&lt;br /&gt;
This returns the value of the cell in position B6 in the range B9:M9.&lt;br /&gt;
&lt;br /&gt;
If $B$6 is 3, this will return the value in cell D9, being the third cell in the range B9:M9.&lt;br /&gt;
&lt;br /&gt;
To do the cumulative calculation, we can use the same INDEX function to return the end of &amp;nbsp;a SUM range, while fixing the start:&lt;br /&gt;
&lt;br /&gt;
=SUM($B9:INDEX($B9:$M9,$B$6))&lt;br /&gt;
&lt;br /&gt;
Again, if B6 contains 3, then this returns the sum of the range B9:D9.&lt;br /&gt;
&lt;br /&gt;
In both cases, these will only recalculate if a cell in the range B9:M9 is edited. In a complex spreadsheet with many calculations, this can make a huge difference to calculation times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/3014519860282512978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/03/excel-tip-using-index-to-calculate.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3014519860282512978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/3014519860282512978'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/03/excel-tip-using-index-to-calculate.html' title='Excel Tip: Using Index to calculate a cumulative sum (e.g. a Year to Date total)'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbZDBlvghEln0KtNZHunE_E8NkstEShDIA3BDSUkA4yW8ev-CNzbdFYfX3mKS4w1dvEdq9lsQwtSJn77JuVnMVwb8NofiRnD4obE-nPSoG2dmUO13sbQeB74qpoVCEc7uTR-PkbXKgNI/s72-c/Cumulative.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-8022801112757397125</id><published>2016-02-09T03:00:00.000+00:00</published><updated>2016-02-09T07:09:46.197+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Controlling what is printed from a sheet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_BBq-AlME4iFIE3acy4aJOdsIYl4T7BPRB7jkvGHt-XUbRETTk4ji6Kdrz2C4RnWQywo7jmchnx0r3nyq18UgPoZsDHTgoQJPklKGVZu4ePNsbAp2CAyn93DazZ4rzKrCQLLjNLG6qhw/s1600/Printer.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;269&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_BBq-AlME4iFIE3acy4aJOdsIYl4T7BPRB7jkvGHt-XUbRETTk4ji6Kdrz2C4RnWQywo7jmchnx0r3nyq18UgPoZsDHTgoQJPklKGVZu4ePNsbAp2CAyn93DazZ4rzKrCQLLjNLG6qhw/s320/Printer.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
One of the challenges that many Excel users face, is ensuring that the printed version of a spreadsheet looks as good as it did on the screen.&lt;br /&gt;
&lt;br /&gt;
There are a few simple things that you need to know to help to organise what actually gets printed and how it is spread across pages.&lt;br /&gt;
&lt;br /&gt;
I will cover the first of these today, and revisit some of the others in future posts.&lt;br /&gt;
&lt;br /&gt;
Today we will look at how to determine how much of the sheet is actually printed.&lt;br /&gt;
&lt;br /&gt;
Left to its own devices, Excel will print all of the used area on the sheet, Specifically, it will print the whole area from cell A1 to the rightmost column and the last row that are not empty.&lt;br /&gt;
&lt;br /&gt;
This may not be what is required, and it is easy to change. Simply highlight the area that you do want to print, then go to the Page Layout ribbon, click the Print Area icon, and select Set Print Area.&lt;br /&gt;
&lt;br /&gt;
You can even select multiple ranges (holding down the Control key, while you select the subsequent ranges) which Excel will print on different pages.&lt;br /&gt;
&lt;br /&gt;
For example, you may have a Profit &amp;amp; Loss and Balance Sheet alongside each other on one worksheet. Just highlight the area of the Profit and Loss (say A1:H100) and then hold down the Control key while selecting the Balance Sheet range (say J1:P80) and Set Print Area as described above.&lt;br /&gt;
&lt;br /&gt;
Once a Print Area has been set in this way, you can see (and edit it) using the Name Manager on the Formulas ribbon. You will see all of the Print Areas in the workbook listed there and (scope to their particular worksheet). You can then edit these ranges &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/02/excel-tip-short-introduction-to-named.html&quot; target=&quot;_blank&quot;&gt;like any other&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You can even make them a &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/11/excel-tip-introduction-to-dynamic-ranges.html&quot; target=&quot;_blank&quot;&gt;dynamic range&lt;/a&gt; using functions like OFFSET and INDEX, so that the area that gets printed is determined by values in the workbook.&lt;br /&gt;
&lt;br /&gt;
A particularly useful technique is to combine this ability to set a dynamic Print Area with a formula to determine the last row of data. I explained a formula to do this in &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/02/excel-tip-find-last-row-of-data.html&quot; target=&quot;_blank&quot;&gt;this earlier post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say we put this formula in a cell that we name LastRow.&lt;br /&gt;
&lt;br /&gt;
If we want the print area to be columns A to J but the height of the print area to flex to the amount of rows occupied, we can enter the following as the Print Area (in the Names Manager):&lt;br /&gt;
&lt;br /&gt;
=OFFSET($A$1,0,0,LastRow,10)&lt;br /&gt;
&lt;br /&gt;
This will print a range starting at A1, with a height of LastRow, and a width of 10 (A to J is 10 columns).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.mothresource.com/147-28-1-47.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Free Excel Dashboard Webinar&quot; src=&quot;http://www.mothresource.com/idevaffiliate/banners/webinar_473x61.png&quot; height=&quot;61&quot; style=&quot;border: 0px;&quot; width=&quot;473&quot; /&gt;&lt;/a&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/8022801112757397125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/02/excel-tip-controlling-what-is-printed.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/8022801112757397125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/8022801112757397125'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/02/excel-tip-controlling-what-is-printed.html' title='Excel Tip: Controlling what is printed from a sheet'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_BBq-AlME4iFIE3acy4aJOdsIYl4T7BPRB7jkvGHt-XUbRETTk4ji6Kdrz2C4RnWQywo7jmchnx0r3nyq18UgPoZsDHTgoQJPklKGVZu4ePNsbAp2CAyn93DazZ4rzKrCQLLjNLG6qhw/s72-c/Printer.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-714221545988206408</id><published>2016-01-12T03:00:00.000+00:00</published><updated>2016-01-12T03:00:15.620+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: An easier way to change cell colours</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBAK4e6oSqG8RqUms9_AjS-MUeaLbfaLAaU6m6-Jo9ioT9bVYU_u6G0QFdVHGWSsCLnPgO6bnPiCpL8_vWYOY5O6Cf-QqnDeUhdEvp8HdIOOHGT8UqloGmcfvGZ9OAqPrs7M-g4xVlT9A/s1600/doh.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBAK4e6oSqG8RqUms9_AjS-MUeaLbfaLAaU6m6-Jo9ioT9bVYU_u6G0QFdVHGWSsCLnPgO6bnPiCpL8_vWYOY5O6Cf-QqnDeUhdEvp8HdIOOHGT8UqloGmcfvGZ9OAqPrs7M-g4xVlT9A/s320/doh.jpg&quot; width=&quot;283&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Before I begin, I would like to wish a Happy New Year to all of my readers and subscribers - as this is my first post of 2016.&lt;br /&gt;
&lt;br /&gt;
I am starting the year in humble mode, as I have had something very simple pointed out to me that I can&#39;t believe I had never spotted, despite it being right under my nose!&lt;br /&gt;
&lt;br /&gt;
In my last post of 2015, I showed you some code to swap one cell colour for another throughout a worksheet. I then received a comment from a reader that I only know as Jim, pointing out that Excel already has a very simple way of doing this!&lt;br /&gt;
&lt;br /&gt;
It can in fact be done using Find and Replace.&lt;br /&gt;
&lt;br /&gt;
This amazed me because I use Find and Replace all of the time and didn&#39;t know you could do this!&lt;br /&gt;
&lt;br /&gt;
It is simple as this:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Highlight the range which you want to apply the changes to&lt;/li&gt;
&lt;li&gt;Click Find and Select (the binoculars icon) on the Home Ribbon and choose Replace from the dropdown menu&lt;/li&gt;
&lt;li&gt;Don&#39;t enter anything in the Find or Replace boxes, but click the Format button next to the Find box and on the Fill Tab, select the colour that you wish to change&lt;/li&gt;
&lt;li&gt;Click the Format box next to the Replace box and on the Fill Tab, select the new colour that you wish to swap for the colour you selected above&lt;/li&gt;
&lt;li&gt;Click Replace All&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
You can even start with the colour of an existing cell, using the dropdown on the format button, however be sure to remove any other formats other than Fill colour.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The thing that really shocked me is that these two big Format buttons have been right there in front of me every time that I&#39;ve used Find and Replace since Excel 2003! And that&#39;s a lot of times!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In 2016, I am going to try to make sure that I constantly keep my eyes open for new ways to do things in Excel, instead of just relying on what I think I already know! And thanks again, Jim.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/714221545988206408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2016/01/excel-tip-easier-way-to-change-cell.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/714221545988206408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/714221545988206408'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2016/01/excel-tip-easier-way-to-change-cell.html' title='Excel Tip: An easier way to change cell colours'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBAK4e6oSqG8RqUms9_AjS-MUeaLbfaLAaU6m6-Jo9ioT9bVYU_u6G0QFdVHGWSsCLnPgO6bnPiCpL8_vWYOY5O6Cf-QqnDeUhdEvp8HdIOOHGT8UqloGmcfvGZ9OAqPrs7M-g4xVlT9A/s72-c/doh.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-5959293959574422588</id><published>2015-12-22T03:00:00.000+00:00</published><updated>2015-12-22T07:28:14.123+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Merry Christmas with a quick macro to swap one colour for another</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi78TsDhNgNKqU-j1DIDef4dVfouVYyJ81VYFrLO7asHoq4vDmMoa58bgwfumjs1VVVwGYhQMiewKDwqzzfIH0sJCLi4ega_NvypvwAQOsnJI6pEREtYfJmsHczJn4k5Oz9SUowaTViJdY/s1600/Santa.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;219&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi78TsDhNgNKqU-j1DIDef4dVfouVYyJ81VYFrLO7asHoq4vDmMoa58bgwfumjs1VVVwGYhQMiewKDwqzzfIH0sJCLi4ega_NvypvwAQOsnJI6pEREtYfJmsHczJn4k5Oz9SUowaTViJdY/s320/Santa.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
First of all I would like to wish all of my readers and subscribers, a very Merry Christmas and a Happy 2016.&lt;br /&gt;
&lt;br /&gt;
I know we all work hard, and I hope, like me, you all get a chance to spend some time with those you love in the coming days, whether Christmas is a festival you celebrate or not.&lt;br /&gt;
&lt;br /&gt;
One hassle I sometimes have when building spreadsheets for others is changing colours.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet may work perfectly, but the end user might not like the colours I have chosen. This isn&#39;t too much of a problem if we are talking about large blocks of colour, but it can be a time-taking process, if I have used yellow to denote input cells throughout the whole worksheet, and the client wants orange, for example!&lt;br /&gt;
&lt;br /&gt;
When this happened recently on a particularly complex spreadsheet, I decided to write a little macro to help, which turned out to be pretty straightforward and does the job in seconds.&lt;br /&gt;
&lt;br /&gt;
Here is the code of the macro.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: lime;&quot;&gt;Sub ColourSwap()&lt;/span&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;Dim Source As Variant&lt;br /&gt;Dim R As Integer&lt;br /&gt;Dim G As Integer&lt;br /&gt;Dim B As Integer&lt;br /&gt;Dim NewColour As Variant&lt;br /&gt;Source = ActiveCell.Interior.Color&lt;br /&gt;If MsgBox(&quot;Switch to no colour?&quot;, vbYesNo) = vbYes Then&lt;br /&gt;NewColour = 0&lt;br /&gt;For Each cell In ActiveSheet.Cells&lt;br /&gt;If cell.Interior.Color = Source Then cell.Interior.ColorIndex = NewColour&lt;br /&gt;Next&lt;br /&gt;Else&lt;br /&gt;R = InputBox(&quot;R?&quot;)&lt;br /&gt;G = InputBox(&quot;G?&quot;)&lt;br /&gt;B = InputBox(&quot;B?&quot;)&lt;br /&gt;NewColour = RGB(R, G, B)&lt;br /&gt;For Each cell In ActiveSheet.UsedRange.Cells&lt;br /&gt;If cell.Interior.Color = Source Then cell.Interior.Color = NewColour&lt;br /&gt;Next&lt;br /&gt;End If&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: lime;&quot;&gt;End Sub&lt;/span&gt;&lt;/blockquote&gt;
The easiest way to include it in your spreadsheet is to hit Alt-F8 and type the name you want to call the macro in the box at the top of the dialog. I have called it ColourSwap. Click create and you will see the green sections above already showing in the window (with your chosen name replacing ColourSwap). Just paste the yellow section in between.&lt;br /&gt;
&lt;br /&gt;
You can run the macro by hitting Alt-F8 again, selecting it and choosing Run. If you prefer, you can click options instead of Run, and assign a shortcut key to run it in future.&lt;br /&gt;
&lt;br /&gt;
The macro works as follows, and is applied to a single worksheet at a time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Click on one of the cells that contain the colour that you wish to swap;&lt;/li&gt;
&lt;li&gt;Run the Macro&lt;/li&gt;
&lt;li&gt;You will be asked if you wish to &quot;Switch to no colour?&quot;, if you select &quot;Yes&quot;, then all of the cells on that worksheet that are the same colour as the cell you selected, will have any Fill Colour removed. This is the same as choosing No Fill if you were colouring the cell manually.&lt;/li&gt;
&lt;li&gt;If you select &quot;No&quot;, you will be faced with 3 prompts, requesting the R, G and B values for the colour you wish to swap to. Once you enter these, all of the cells on the worksheet that are the same colour as the cell you selected, will be filled with this new colour.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
NB: The macro only checks the Used Range of the worksheet, so will not change any coloured cells below, or to the right of the last populated cell on the worksheet. This is to save time, as it can take quite a while to loop through every cell, when this is not necessary. If (for some reason) you have coloured cells outside of the Used Range, then these should be very easy to change manually, as they will almost certainly be in a large block.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Note that if you wish to save the Macro with the spreadsheet, you will need to save the Workbook as Macro-enabled Workbook, however this will usually be unnecessary, as once the colours have been changed, the macro is no longer needed, so that you can let it save without the macro.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I hope you find this useful, and could maybe use it to make some tired old spreadsheets look a bit more festive!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Merry Christmas!&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/5959293959574422588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/12/excel-tip-merry-christmas-with-quick.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/5959293959574422588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/5959293959574422588'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/12/excel-tip-merry-christmas-with-quick.html' title='Excel Tip: Merry Christmas with a quick macro to swap one colour for another'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi78TsDhNgNKqU-j1DIDef4dVfouVYyJ81VYFrLO7asHoq4vDmMoa58bgwfumjs1VVVwGYhQMiewKDwqzzfIH0sJCLi4ega_NvypvwAQOsnJI6pEREtYfJmsHczJn4k5Oz9SUowaTViJdY/s72-c/Santa.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-9131206055157124272</id><published>2015-12-01T03:00:00.000+00:00</published><updated>2015-12-01T03:00:01.543+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: How many calendar months does a date range affect?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGsydkqVdLPnoFexhqCdMqXo8lVJZuZy03zLIe-rlw6rTWmrb5VxVkIdxOGC1g9R5ISNwQ-gmheO-qPQSz8lBTvEk31u9V2o214p53xqrbD510ccentf1OBtHEaSa037KCmwwYhUTc_Rc/s1600/Calendar2016.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGsydkqVdLPnoFexhqCdMqXo8lVJZuZy03zLIe-rlw6rTWmrb5VxVkIdxOGC1g9R5ISNwQ-gmheO-qPQSz8lBTvEk31u9V2o214p53xqrbD510ccentf1OBtHEaSa037KCmwwYhUTc_Rc/s320/Calendar2016.jpg&quot; width=&quot;304&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
This week I responded to a client request for a formula that seemed straight-forward, but it took a few emails backwards and forwards to establish exactly what was required.&lt;br /&gt;
&lt;br /&gt;
My answers at each stage, provide a number of alternative versions of what appear to be the same thing - but aren&#39;t!&lt;br /&gt;
&lt;br /&gt;
The question itself was essentially &quot;How do I calculate the number of months between two dates?&quot;&lt;br /&gt;
&lt;br /&gt;
My first response to this question used the DATEDIF function as featured in &lt;a href=&quot;http://www.notjustnumbers.co.uk/2013/07/excel-tip-calculating-elapsed-time.html&quot; target=&quot;_blank&quot;&gt;this earlier post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Assuming that the start date is in cell A1 and the end date is in cell A2, then:&lt;br /&gt;
&lt;br /&gt;
=DATEDIF(A1,A2,&quot;M&quot;)&lt;br /&gt;
&lt;br /&gt;
will return the number of WHOLE months between the two dates.&lt;br /&gt;
&lt;br /&gt;
My client then said that they wanted to always round up the number of months.&lt;br /&gt;
&lt;br /&gt;
I then used the &quot;MD&quot; argument of a DATEDIF to identify the remaining days after calculating the whole months, so that I could use and &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/10/excel-tip-if-statement-made-simple.html&quot; target=&quot;_blank&quot;&gt;IF statement&lt;/a&gt; to add 1 if this remainder was greater than zero:&lt;br /&gt;
&lt;br /&gt;
=DATEDIF(A1,A2,&quot;M&quot;)+IF(DATEDIF(A1,A2,&quot;MD&quot;)&amp;gt;0,1,0)&lt;br /&gt;
&lt;br /&gt;
Finally, it transpired that what was really required was the number of calendar months touched by the date range, e.g. if the start date was 31st January 2015 and the end date was 1st February 2015, the answer should be 2, as both January and February feature in the date range (with the same dates, our first example would return zero, as there are no whole months and our second would have returned 1, as we rounded the 2 days up to a whole month).&lt;br /&gt;
&lt;br /&gt;
This required a completely different approach, by using the month function to pull out the month from each date, and the year function to pull out the year. The answer would then be the difference between the month numbers, plus 1, plus 12 * the difference in the years, i.e.&lt;br /&gt;
&lt;br /&gt;
=(MONTH(A2)-MONTH(A1)+1)+((YEAR(A2)-YEAR(A1))*12)&lt;br /&gt;
&lt;br /&gt;
Depending upon your specific needs, any one of these formulae might be correct for your requirement!&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/9131206055157124272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/12/excel-tip-how-many-calendar-months-does.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/9131206055157124272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/9131206055157124272'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/12/excel-tip-how-many-calendar-months-does.html' title='Excel Tip: How many calendar months does a date range affect?'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGsydkqVdLPnoFexhqCdMqXo8lVJZuZy03zLIe-rlw6rTWmrb5VxVkIdxOGC1g9R5ISNwQ-gmheO-qPQSz8lBTvEk31u9V2o214p53xqrbD510ccentf1OBtHEaSa037KCmwwYhUTc_Rc/s72-c/Calendar2016.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-7816189268082101999</id><published>2015-11-17T03:00:00.000+00:00</published><updated>2015-11-17T03:00:00.544+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: An introduction to dynamic ranges</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj1lN6KTwxGFJPzkzewvxCqKsAQxqKBgRU55G1sy7TI9mN1Ghuhr2TvXhRxKW98Y5LcOPvyM_-dEEzK1oww47lfgvIqXnZyf0A4zbjM5qcmfJHfDLrgCxHLQmZGbpi0UtxELz-RE932m0/s1600/Dynamic+Range.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj1lN6KTwxGFJPzkzewvxCqKsAQxqKBgRU55G1sy7TI9mN1Ghuhr2TvXhRxKW98Y5LcOPvyM_-dEEzK1oww47lfgvIqXnZyf0A4zbjM5qcmfJHfDLrgCxHLQmZGbpi0UtxELz-RE932m0/s320/Dynamic+Range.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A few months ago I wrote a post &amp;nbsp;introducing the use of ranges in Excel:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/02/excel-tip-short-introduction-to-named.html&quot; target=&quot;_blank&quot;&gt;Excel Tip: A short introduction to named ranges&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In that post I alluded to dynamic ranges but didn&#39;t really say much about them, so I thought I would expand a little on the subject now.&lt;br /&gt;
&lt;br /&gt;
As the name suggests, dynamic ranges are ranges that are not fixed. The range referred to varies based upon either the cell in which the reference is used or a variable (or variables) referred to in a formula, or both.&lt;br /&gt;
&lt;br /&gt;
If we go to name a new range using the Name Manager on the Formulas ribbon (if you need a refresher on this, please visit my &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/02/excel-tip-short-introduction-to-named.html&quot; target=&quot;_blank&quot;&gt;earlier post&lt;/a&gt;), and in the &quot;Refers to&quot; box, we highlight a range, then by default this range is absolute (Excel automatically inserts the &lt;a href=&quot;http://www.notjustnumbers.co.uk/2011/05/excel-tip-dollar-sign-in-formula-fixing.html&quot; target=&quot;_blank&quot;&gt;dollar signs&lt;/a&gt; to fix the row and column references).&lt;br /&gt;
&lt;br /&gt;
So, if we type &quot;Test&quot; in the Name field and delete the contents of the &quot;Refers to&quot; box, then click in cell A1 of Sheet1 (while still in the &quot;Refers to&quot; box), Excel populates the &quot;Refers to&quot; box with:&lt;br /&gt;
&lt;br /&gt;
=Sheet1!$A$1&lt;br /&gt;
&lt;br /&gt;
This means that if we refer to the range &quot;Test&quot; anywhere else in the workbook, it will look at the contents of cell A1 of Sheet1. This is a normal (fixed) range.&lt;br /&gt;
&lt;br /&gt;
Now let&#39;s create a dynamic range.&lt;br /&gt;
&lt;br /&gt;
We will follow the same process to create second range, but this time, ensure that cell B1 is selected before we start. Again create a new range in the Name Manager but call it Test2 this time. Delete the contents of the &quot;Refers to&quot; box again, then, again, click in cell A1. This will populate the &quot;Refers to&quot; box, as before, with:&lt;br /&gt;
&lt;br /&gt;
=Sheet1!$A$1&lt;br /&gt;
&lt;br /&gt;
This time though, before clicking OK, &lt;a href=&quot;http://www.notjustnumbers.co.uk/2013/06/excel-tip-quick-way-to-add-dollar-signs.html&quot; target=&quot;_blank&quot;&gt;use the F4 key to remove the dollar signs&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The &quot;Refers to&quot; box should now read:&lt;br /&gt;
&lt;br /&gt;
=Sheet1!A1&lt;br /&gt;
&lt;br /&gt;
This is now a relative reference, relative to the cell we had selected prior to defining the range (B1). The range &quot;Test2&quot;, will now refer to the contents of the cell immediately to the left of the cell that you use it in (as A1 is the cell immediately to the left of B1).&lt;br /&gt;
&lt;br /&gt;
Try typing the formula =Test in multiple cells. This will always return the contents of cell A1. But type =Test2 in any cell, and it will return the contents of the cell to its left. &quot;Test2&quot; is therefore a dynamic range - the cell(s) it refers to change depending on where it is used.&lt;br /&gt;
&lt;br /&gt;
Note that this is not just the case with a single cell, we can refer to a number of cells.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take an example. Let&#39;s say that we have a 12 month budget, with the 12 monthly values in columns B to M. Click in cell N1 and name a new range in the Name Manager called &quot;FullYear&quot; and type the following into the &quot;Refers to&quot; box:&lt;br /&gt;
&lt;br /&gt;
=Sheet1!$B1:$M1&lt;br /&gt;
&lt;br /&gt;
We can either type this in, or as before, highlight the cells B1 to M1, but then use the F4 key on each of the references to remove the dollar from the row reference.&lt;br /&gt;
&lt;br /&gt;
Note that I have left the dollars on the column references. This means that the row will change, but the columns will stay fixed. This means that we can use the formula =SUM(FullYear) and it will always sum columns B to M of the current row.&lt;br /&gt;
&lt;br /&gt;
Sticking with this same example, we can use the &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/02/using-offset-function-in-microsoft.html&quot; target=&quot;_blank&quot;&gt;OFFSET function&lt;/a&gt; to extend this further and allow us to have dynamic ranges for the current month&#39;s balance, and the year to date balance.&lt;br /&gt;
&lt;br /&gt;
If we store the number of the current month (1 to 12) in cell P1, then we can name a range called &quot;MonthBalance&quot; by clicing in cell N1, and creating the range as before, but typing the following formula in the &quot;Refers to&quot; box:&lt;br /&gt;
&lt;br /&gt;
=OFFSET($B1,0,$P$1-1)&lt;br /&gt;
&lt;br /&gt;
Note the use of the dollars, The column of B1 is fixed but the row is left relative, whereas P1 is entirely fixed.&lt;br /&gt;
&lt;br /&gt;
This will return the contents of the cell P1-1 cells to the right of column B, on the same row. So if the month number entered in P1 is 3, P1-1 =2. As column B is the month 1 balance, 2 columns to the right in column D is the month 3 balance!&lt;br /&gt;
&lt;br /&gt;
So we can enter =MonthBalance in any cell and it will return the current month&#39;s balance from that row.&lt;br /&gt;
&lt;br /&gt;
We can define the range &quot;YTD&quot; as:&lt;br /&gt;
&lt;br /&gt;
=OFFSET($B1,0,0,1,$P$1)&lt;br /&gt;
&lt;br /&gt;
This will return a range P1 wide and 1 row high starting in column B of the current row, i.e. all of the months to date. As this will usually be more than one cell, you will need to use SUM to total the range.&lt;br /&gt;
&lt;br /&gt;
We can now use =SUM(FullYear), =MonthBalance and =SUM(YTD), to give us these totals on any row of the sheet. In addition, MonthBalance and SUM(YTD) will change depending on the month number entered in P1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/7816189268082101999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/11/excel-tip-introduction-to-dynamic-ranges.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/7816189268082101999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/7816189268082101999'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/11/excel-tip-introduction-to-dynamic-ranges.html' title='Excel Tip: An introduction to dynamic ranges'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj1lN6KTwxGFJPzkzewvxCqKsAQxqKBgRU55G1sy7TI9mN1Ghuhr2TvXhRxKW98Y5LcOPvyM_-dEEzK1oww47lfgvIqXnZyf0A4zbjM5qcmfJHfDLrgCxHLQmZGbpi0UtxELz-RE932m0/s72-c/Dynamic+Range.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-1189956245883306778</id><published>2015-10-27T03:00:00.000+00:00</published><updated>2015-10-27T07:27:09.817+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Return the formula text from a cell, rather than its value</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT61pHdV7Ek3JPGUUoHu9xTqZt2KoXqd2IQmgpEzEYsHTqiECchlNadC3msGqO3jxI4tkMVoaFPrdy-GCzl_qE_KDYBOd7F548qttbuYK60dRx17PJbkbMs8DesLDhjegnrDMvZUMEYF8/s1600/Formula.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT61pHdV7Ek3JPGUUoHu9xTqZt2KoXqd2IQmgpEzEYsHTqiECchlNadC3msGqO3jxI4tkMVoaFPrdy-GCzl_qE_KDYBOd7F548qttbuYK60dRx17PJbkbMs8DesLDhjegnrDMvZUMEYF8/s320/Formula.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Just a short little tip this week, due to a hectic diary.&lt;br /&gt;
&lt;br /&gt;
When you reference a cell in Excel, you will get its value, but what if you want to return the formula itself?&lt;br /&gt;
&lt;br /&gt;
Excel, as usual, provides a way to do this.&lt;br /&gt;
&lt;br /&gt;
NB: This function is only available in Excel 2013 onward. If you need this functionality in earlier versions of Excel, Bill Jelen has a &lt;a href=&quot;https://www.youtube.com/watch?v=wpRGTvhp1cY&quot; target=&quot;_blank&quot;&gt;simple video&lt;/a&gt; on how to create a User-defined function to do it.&lt;br /&gt;
&lt;br /&gt;
Let us say that cell A1 contains:&lt;br /&gt;
&lt;br /&gt;
=SUM(B1:B10)&lt;br /&gt;
&lt;br /&gt;
If we enter the following into cell C1:&lt;br /&gt;
&lt;br /&gt;
=A1&lt;br /&gt;
&lt;br /&gt;
then cell C1 will show the same number that A1 shows, i.e. the sum of the numbers in cells B1 to B10.&lt;br /&gt;
&lt;br /&gt;
What if we wanted to see the actual formula in cell A1?&lt;br /&gt;
&lt;br /&gt;
We can use the FORMULATEXT function in C1:&lt;br /&gt;
&lt;br /&gt;
=FORMULATEXT(A1)&lt;br /&gt;
&lt;br /&gt;
This will return the text:&lt;br /&gt;
&lt;br /&gt;
=SUM(B1:B10)&lt;br /&gt;
&lt;br /&gt;
This may be useful for its own sake (for example, to show how numbers are calculated alongside the numbers themselves), or to return the text of the formula, so that you can &lt;a href=&quot;http://www.notjustnumbers.co.uk/2010/06/excel-tip-manipulating-text-in.html&quot; target=&quot;_blank&quot;&gt;manipulate it&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A couple of things to note:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;FORMULATEXT will return #N/A if:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;the cell does not contain a formula&lt;/li&gt;
&lt;li&gt;the formula is more than 8,192 characters!&lt;/li&gt;
&lt;li&gt;worksheet protection doesn&#39;t allow the formula to be shown&lt;/li&gt;
&lt;li&gt;it refers to an external workbook that is not open.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;If the range argument is more than one cell, it will return the formula in the top left cell of the range.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/1189956245883306778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/10/excel-tip-return-formula-text-from-cell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1189956245883306778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1189956245883306778'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/10/excel-tip-return-formula-text-from-cell.html' title='Excel Tip: Return the formula text from a cell, rather than its value'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT61pHdV7Ek3JPGUUoHu9xTqZt2KoXqd2IQmgpEzEYsHTqiECchlNadC3msGqO3jxI4tkMVoaFPrdy-GCzl_qE_KDYBOd7F548qttbuYK60dRx17PJbkbMs8DesLDhjegnrDMvZUMEYF8/s72-c/Formula.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-4918736829878762665</id><published>2015-10-13T03:00:00.000+01:00</published><updated>2015-10-13T03:00:00.840+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Show negative numbers in brackets</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Gd8HBXNqVZgIFu3V5GrO6dHRjUgEuTjtFWZF0SxXl8eJstOHPJO2HTRiSDZ8QgNVle8nBevARLc47EfeZJy3qN6aFhj-kAaI-ihjsYX1AjP8diouhONkddAIaIg9cszLOr9SoeBo-os/s1600/Brackets.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Gd8HBXNqVZgIFu3V5GrO6dHRjUgEuTjtFWZF0SxXl8eJstOHPJO2HTRiSDZ8QgNVle8nBevARLc47EfeZJy3qN6aFhj-kAaI-ihjsYX1AjP8diouhONkddAIaIg9cszLOr9SoeBo-os/s320/Brackets.jpg&quot; width=&quot;252&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Working with accountants, one of the requirements I often get asked for, is to show negative numbers in brackets.&lt;br /&gt;
&lt;br /&gt;
Surprisingly, this is not one of the standard number formats in Excel, not even if you choose the Accounting format!&lt;br /&gt;
&lt;br /&gt;
Fortunately, however, this can be remedied using a custom number format.&lt;br /&gt;
&lt;br /&gt;
It is usually easier to start with a format that is close to what you want. We will start with the Accounting format, to 2 decimal places, and no currency symbol.&lt;br /&gt;
&lt;br /&gt;
To select this, right-click the cell, choose Format Cells and, on the Number Format tab, selecting Accounting. In the information to the right, select 2 decimal places and None (for the currency symbol).&lt;br /&gt;
&lt;br /&gt;
Click OK to store this as the number format for that cell (or the range of cells selected).&lt;br /&gt;
&lt;br /&gt;
Now follow the same sequence again, but this time choose Custom as the Number Format. You will see the code for the existing format (as previously selected) in the box at the top of the section on the right:&lt;br /&gt;
&lt;br /&gt;
_-* #,##0.00_-;-* #,##0.00_-;_-* &quot;-&quot;??_-;_-@_-&lt;br /&gt;
&lt;br /&gt;
We will edit this code to give us our brackets.&lt;br /&gt;
&lt;br /&gt;
The first thing that we need to be aware of is the different sections of the code. This format uses the maximum four sections, each section being separated by semicolons.&lt;br /&gt;
&lt;br /&gt;
The sections are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Positive Numbers&lt;/li&gt;
&lt;li&gt;Negative Numbers&lt;/li&gt;
&lt;li&gt;Zero&lt;/li&gt;
&lt;li&gt;Text&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
It is not necessary to have all of these. &amp;nbsp;Any sections not included will follow the formatting set in section 1.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In this case, however, we have all four sections, but we are only interested in changing the first three - in particular Section 2 for negative numbers.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
From above, we can see that the current formatting for negative numbers as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
-* #,##0.00_-&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first character is simply the minus sign.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is followed by an asterisk (*) and a space. The asterisk tells Excel to repeat the character that follows it, to fill the remainder of the cell. As this is followed by a space, this tells Excel to pad out the area between the minus sign and the number with spaces, so that the whole cell is occupied. This is why the minus sign is shown on the far left in the Accounting format.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The #,##0.00 tells Excel that we want to see the number to two decimal places, with commas to mark thousands.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Finally, the _- creates a space the width of the minus sign. The underscore (_) symbol, inserts a space the width of the character that follows it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To edit this to show our brackets, we can do the following:&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Delete the leading - sign, as the brackets will denote the negative&lt;/li&gt;
&lt;li&gt;Place an opening bracket immediately before the number, assuming that we want the opening bracket to be placed after the leading spaces&lt;/li&gt;
&lt;li&gt;Replace the _- with a closing bracket. We no longer need the minus width space at the end, but we do want a closing bracket here&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The new negative format should now look like this:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
* (#,##0.00)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is not the end of the story, however. We want to also slightly tweak the positive and zero sections, so that they line up correctly with the bracketed negatives.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The positive section currently looks like this:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
_-* #,##0.00_-&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We need to ensure that we have a space the width of a bracket in the same places that we have the brackets in the negative number. We also don&#39;t need the space the width of a - at the start and end, as these were removed from the negative.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The new positive format looks like this:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
* _(#,##0.00_)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Finally, we need to make the same changes to the zero format which currently looks like this:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
_-* &quot;-&quot;??_-&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But, applying these changes, becomes:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
* _(&quot;-&quot;??_)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, the complete new number format is:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
* _(#,##0.00_);* (#,##0.00);* _(&quot;-&quot;??_);_-@_-&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We could trim this down even further if we like.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We don&#39;t really require the leading spaces, as there is nothing to the left of them, so we could remover the Asterisk and the space at the start of the positive, negative and zero sections.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We also, don&#39;t really need the text section, as this was only adding the leading space to coincide with the minus on the negative numbers, as well as the trailing space that was against all of the numbers.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Our streamlined format now looks like this:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
_(#,##0.00_);(#,##0.00);_(&quot;-&quot;??_)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And if you don&#39;t care how we got here, you can just select Custom Format and paste the above code in!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/4918736829878762665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/10/excel-tip-show-negative-numbers-in.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4918736829878762665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/4918736829878762665'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/10/excel-tip-show-negative-numbers-in.html' title='Excel Tip: Show negative numbers in brackets'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Gd8HBXNqVZgIFu3V5GrO6dHRjUgEuTjtFWZF0SxXl8eJstOHPJO2HTRiSDZ8QgNVle8nBevARLc47EfeZJy3qN6aFhj-kAaI-ihjsYX1AjP8diouhONkddAIaIg9cszLOr9SoeBo-os/s72-c/Brackets.jpg" height="72" width="72"/><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-1794503924714464560</id><published>2015-09-29T03:00:00.000+01:00</published><updated>2015-09-29T03:00:01.987+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Display current sheetname</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyll7bzgvT3I_rpuGmHeeglsi0n24sSlhwIR3J0zcI0RkOTpE2L2iGBGuHiEG8t_QV8X_N-myzjX-YDWe3CGpuCZTLy-Z1gCb0wwANjs6kYaHPJ9YnpFu6YpzxG_dwwfGl67ZZh1GwdoU/s1600/Tabs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyll7bzgvT3I_rpuGmHeeglsi0n24sSlhwIR3J0zcI0RkOTpE2L2iGBGuHiEG8t_QV8X_N-myzjX-YDWe3CGpuCZTLy-Z1gCb0wwANjs6kYaHPJ9YnpFu6YpzxG_dwwfGl67ZZh1GwdoU/s320/Tabs.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Sometimes it can be very handy in a spreadsheet with multiple sheets, to show the sheet name in the sheet itself.&lt;br /&gt;
&lt;br /&gt;
Say you have a sheet for each salesperson and new sheets are regularly being added and you name the sheets with the salesperson&#39;s names and want the same name to appear in the heading on the sheet. This is particularly important when printing the sheets as the worksheet name will not be visible.&lt;br /&gt;
&lt;br /&gt;
You could, of course, type the same name in the header as the name of the sheet, but this has a few disadvantages:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;It&#39;s twice as much work&lt;/li&gt;
&lt;li&gt;You may forget, and have a different salesperson&#39;s name on the printed reports as is being used to pay them for example. This kind of inconsistency can lead to all sorts of problems!&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Fortunately, it is relatively easy to get at the sheet name in a formula.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We can use the CELL command to do most of the work. This allows you to pull information about the current cell. In this case we are going to use it to pull the file path (including the sheet name). This is done by entering &quot;filename&quot; as the info type argument in the CELL command as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
=CELL(&quot;filename&quot;)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This will show something like:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
C:\Users\Glen\Documents\[MySpreadsheet.xlsx]SheetName&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
where MySpreadsheet.xlsx is the name of the spreadsheet and SheetName is the name of the sheet that contains the CELL function above.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As we just want the sheet name, we can use the fact that the workbook name is enclosed in square brackets as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
=MID(CELL(&quot;filename&quot;),FIND(&quot;]&quot;,CELL(&quot;filename&quot;))+1,999)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.notjustnumbers.co.uk/2014/07/excel-tip-find-code-in-among-other-text.html&quot; target=&quot;_blank&quot;&gt;This earlier post&lt;/a&gt; gives more information on both the FIND and MID functions.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Essentially, this returns the 999 characters starting at the position after it finds the &quot;]&quot; (the&amp;nbsp;+1 ensures that we don&#39;t start until the character after the &quot;]&quot;). I have simply used 999 to ensure that all of the characters after the &quot;]&quot; are returned. It will not return any extra characters, so will just return all of the characters after the &quot;]&quot;, i.e. the sheet name!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/1794503924714464560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/09/excel-tip-display-current-sheetname.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1794503924714464560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1794503924714464560'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/09/excel-tip-display-current-sheetname.html' title='Excel Tip: Display current sheetname'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyll7bzgvT3I_rpuGmHeeglsi0n24sSlhwIR3J0zcI0RkOTpE2L2iGBGuHiEG8t_QV8X_N-myzjX-YDWe3CGpuCZTLy-Z1gCb0wwANjs6kYaHPJ9YnpFu6YpzxG_dwwfGl67ZZh1GwdoU/s72-c/Tabs.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-281112250173135249</id><published>2015-09-22T03:00:00.000+01:00</published><updated>2015-09-22T07:23:45.641+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel Tip: Make it easy to enter the arguments for a function</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizeFAE6nLnmd-jIIFFAKz3-L9o0vDYtmeku3e0muA7ZnCzF_8OMHoHedQ8yzJkwY_7DZ6Xe8fXOTQfBRXSknUdt0ix_NY0v9TJ4efbQzmzcUasd9Q2nalw7VjZ0GWyO19pKbdSl6-bBEo/s1600/Learn.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizeFAE6nLnmd-jIIFFAKz3-L9o0vDYtmeku3e0muA7ZnCzF_8OMHoHedQ8yzJkwY_7DZ6Xe8fXOTQfBRXSknUdt0ix_NY0v9TJ4efbQzmzcUasd9Q2nalw7VjZ0GWyO19pKbdSl6-bBEo/s320/Learn.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I have said this many times before, but one of the things I like most about working with Excel is that there is always something new to learn.&lt;br /&gt;
&lt;br /&gt;
I don&#39;t just mean learning new features as they are added. I mean learning things that have always been there that you didn&#39;t know about!&lt;br /&gt;
&lt;br /&gt;
A blog post on another Excel expert&#39;s blog taught me a really simple one the other day, that I&#39;m not sure how I&#39;ve missed!&lt;br /&gt;
&lt;br /&gt;
Reading a post on &lt;a href=&quot;http://exceluser.com/index.htm&quot; target=&quot;_blank&quot;&gt;Charley Kyd&#39;s ExelUser blog&lt;/a&gt; on &lt;a href=&quot;http://exceluser.com/formulas/excels-five-annuity-functions.htm&quot; target=&quot;_blank&quot;&gt;Excel&#39;s Five Annuity Functions&lt;/a&gt;, he revealed a simple feature that I had never come across, but could be useful when entering any function in Excel.&lt;br /&gt;
&lt;br /&gt;
Did you know that you can start typing any function and then press Ctrl-Shift-A for excel to fill it in with the names of the arguments, which you can then simply replace with the actual arguments.&lt;br /&gt;
&lt;br /&gt;
For example, if you type:&lt;br /&gt;
&lt;br /&gt;
=VLOOKUP&lt;br /&gt;
&lt;br /&gt;
and press Ctrl-Shift-A, Excel puts the following into the formula bar:&lt;br /&gt;
&lt;br /&gt;
=VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)&lt;br /&gt;
&lt;br /&gt;
You can then replace these argument names with the arguments for your particular scenario.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you could even leave it as is and &lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/02/excel-tip-short-introduction-to-named.html&quot; target=&quot;_blank&quot;&gt;name the cells and ranges&lt;/a&gt; that hold the arguments with these argument names as range names.&lt;br /&gt;
&lt;br /&gt;
i.e. name the cell that contains the value you want to look up, lookup_value and the range that contains your lookup table table_array, etc.&lt;br /&gt;
&lt;br /&gt;
I&#39;m not sure I would use the range naming approach, not least because you could then only use the function once in your spreadsheet!&lt;br /&gt;
&lt;br /&gt;
Using Ctrl-Shift-A to give me a skeleton to enter the function arguments does sound useful though.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/281112250173135249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/09/excel-tip-make-it-easy-to-enter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/281112250173135249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/281112250173135249'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/09/excel-tip-make-it-easy-to-enter.html' title='Excel Tip: Make it easy to enter the arguments for a function'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizeFAE6nLnmd-jIIFFAKz3-L9o0vDYtmeku3e0muA7ZnCzF_8OMHoHedQ8yzJkwY_7DZ6Xe8fXOTQfBRXSknUdt0ix_NY0v9TJ4efbQzmzcUasd9Q2nalw7VjZ0GWyO19pKbdSl6-bBEo/s72-c/Learn.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1869924468172210809.post-1414936841671944849</id><published>2015-09-15T03:00:00.000+01:00</published><updated>2015-09-15T03:00:00.459+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel and Business Intelligence</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbXtSG7OveeOzY3Icld57AQB-giodFOkRGyQ38jZNuvkdkiCrz0K6T7fRsZdeCl_YHmf2WXBjRxArreBpYg_Ag2CQ98Z5-IvhNtKbtXdD2dwAR3Poi-iF5MNTKL6e8zaD8TQF0P4pvCno/s1600/BusinessIntelligence.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbXtSG7OveeOzY3Icld57AQB-giodFOkRGyQ38jZNuvkdkiCrz0K6T7fRsZdeCl_YHmf2WXBjRxArreBpYg_Ag2CQ98Z5-IvhNtKbtXdD2dwAR3Poi-iF5MNTKL6e8zaD8TQF0P4pvCno/s320/BusinessIntelligence.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
There has been much talk for years now among IT experts, about getting away from Excel for business reporting, while the reality has tended to move the other way.&lt;br /&gt;
&lt;br /&gt;
In my view, much of the case for specialist Business Intelligence Software is more a case for structure and control in business reporting, rather than proving that we are all using the wrong software.&lt;br /&gt;
&lt;br /&gt;
You can see more discussion on this in an earlier post:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.notjustnumbers.co.uk/2015/07/is-excel-error-prone.html&quot;&gt;http://www.notjustnumbers.co.uk/2015/07/is-excel-error-prone.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I thought this week, that I would share with you a recent article on the website of Investech.com that gathers the views of 27 Excel experts on the subject, including a few names you might recognise, such as Chandoo, Mynda Treacy and myself. Unfortunately, you can tell by the brevity of my comments that they caught me at a busy time!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.investintech.com/resources/blog/archives/5718-experts-predict-the-future-of-excel-in-business-intelligence.html&quot; target=&quot;_blank&quot;&gt;27 MICROSOFT EXCEL EXPERTS PREDICT THE FUTURE OF EXCEL IN BUSINESS INTELLIGENCE&lt;/a&gt;&lt;br /&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;60&quot; scrolling=&quot;no&quot; seamless=&quot;seamless&quot; src=&quot;http://files.bannersnack.com/iframe/embed.html?hash=btje7all&amp;amp;bgcolor=%23499A3E&amp;amp;wmode=opaque&amp;amp;t=1386114257&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;If you enjoyed this post, go to the top of the &lt;a href=&quot;http://www.notjustnumbers.co.uk/&quot;&gt;blog&lt;/a&gt;, where you can subscribe for regular updates and get two freebies&amp;nbsp;&lt;i&gt;&quot;The 5 Excel features that you NEED to know&quot; &lt;/i&gt;and&lt;i&gt; &quot;30 Chants for Better Charts&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.notjustnumbers.co.uk/feeds/1414936841671944849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.notjustnumbers.co.uk/2015/09/excel-and-business-intelligence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1414936841671944849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1869924468172210809/posts/default/1414936841671944849'/><link rel='alternate' type='text/html' href='http://www.notjustnumbers.co.uk/2015/09/excel-and-business-intelligence.html' title='Excel and Business Intelligence'/><author><name>Glen Feechan</name><uri>http://www.blogger.com/profile/15601120984639539346</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbXtSG7OveeOzY3Icld57AQB-giodFOkRGyQ38jZNuvkdkiCrz0K6T7fRsZdeCl_YHmf2WXBjRxArreBpYg_Ag2CQ98Z5-IvhNtKbtXdD2dwAR3Poi-iF5MNTKL6e8zaD8TQF0P4pvCno/s72-c/BusinessIntelligence.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>