In this 6 minute video I show you how to quickly name cell ranges with a powerful keyboard shortcut, and also show you how to use three math functions – SUMIF(), COUNTIF() and AVERAGEIF(). These are good building blocks that you’ll use in spreadsheet calculations and building spreadsheet models – I covered their friends SUM(), COUNT() and AVERAGEIF() in an earlier post that you can read by clicking here.
If you have any trouble watching the HD Youtube video embedded above, you can view the standard Youtube video by clicking here.
0:58 – Named range tricks (Ctrl + F3 to bring up name manager, Ctrl + Shift + F3 to create named range from selection)
1:52 – Create unique list of names (using Excel’s Remove duplicates feature, available in Excel 2007+)
2:30 – Set up data validation drop down list, sourced from a defined named range
3:35 – SUMIF() formula (total lifetime sales)
4:21 – COUNTIF() formula (number of months with sales)
5:04 – AVERAGEIF() formulas (average monthly sales)
5:49 – Using drop down list to select new sales person, formulas automatically recalculate
Named ranges explained
Named ranges are important to understand and use because they make it easier to read formulas. Which would you prefer to read?
= SUMIF ( sales_person, criteria_1, sales )
= SUMIF ( $A$15:$A$170, $B$3, $D$15:$D$170 )
In the first formula, “sales_person”, “criteria_1” and “sales” are named ranges that point to cells on the worksheet. The nice thing about named ranges is that you can customize them and call them something that’s memorable and easy to read. You can’t use spaces in named ranges so I used an underscore when creating the named range “sales_person” – Excel doesn’t accept “sales person” as a named range.
Named ranges make it easier to read formulas.
You need to watch out though, because when you define a static named range like I did in the video you might forget to expand the range when there’s new data. There are ways to make dynamic named ranges that expand and contract when you have new data, but I’ll probably cover these in future posts. So when you see a named range it’s a good idea to check that it points to the correct cells and includes all the data that should be included.
I know that some people prefer hard cell references (like $A$15:$A$170) because they can see exactly where the cells are. With named ranges you need to use the Name Manager to figure this out.
Named range keyboard shortcuts
You can bring up the Name Manager in Excel by pressing Ctrl + F3. This lists the names used in your current workbook, and you can also define new names, edit existing names or delete names from the Name Manager.
The named range trick I introduced in the video is very handy if you want to define several named ranges using data that’s arranged in neat tables. Excel creates named ranges from your selection and uses your data headings as the new names – follow these steps:
- make sure your data has headings (top row, left column, bottom row or right column) as these will turn into the names of your named ranges
- select the data including headings
- press Ctrl + Shift + F3
- in the dialog box select where your headings are (top row, left column, bottom row or right column)
- click OK
When you’ve done this it’s good practice to check your named ranges were correctly defined – use the Name Manager by pressing Ctrl + F3 to check.
Mind Map: Excel Formula Basics (Sumif, Countif, Averageif)
Here is a mind map that summarizes the formulas used in the video – for a full size version that will open in a new browser window click on the picture below.
Learn more Excel Formulas – fast!
I based this video on material found in the Excel Formula 1 e-book, and if you are interested in picking up a copy of this e-book click on this link.
Bear in mind that I will get a commission from Chandoo.org if you purchase a copy of the Formula-1 e-book but the only reason I’m promoting it is that I think it can offer good value to Excel users who are just starting out and want a fast introduction to common Excel formulas.
The author Chandoo is a well-known Excel expert who was awarded Most Valued Professional (MVP) status by Microsoft for the help he has provided to the Excel community online, and he has written the e-book in a friendly informal style that makes it accessible if you don’t want to wade through more technical explanations.