A Named Range is way to describe your formulas. So you don't have to have this in a cell: = SUM(B2:B4 ) You can replace the cell references between the round brackets. You replace them with a descriptive name, all of your own. So you could have this, instead: = SUM(MonthlyTotals ) Behind the MonthlyTotals, though, Excel is hiding the cell references. We'll see how it works, now. Open up Excel and create the spreadsheet below: The formula is in cell B5, and just adds up the monthly totals in the B column.
Define a Name Setting up a Named Range is a two-step process. You first Define the Name, and then you Apply it. To Define your name, do this (make sure you have the formula in cell B5):. Highlight the cells B2 to B4 (NOT B5), then click the Formulas menu. Locate the Named Cells panel in Excel 2007.
In Excel 2010, 2013 and 2016, locate the Defined Names panel instead. Click Name a Range in Excel 2007 and Define Name in Excel 2010 and 2013 From the Name a Range menu, click Name a Range ( Define Name again in Excel 2010/16): You'll then get the following dialogue box: Click OK on the New Name dialogue box. Notice that the Name is our heading of MonthlyTotals. When you click OK, you'll be returned to your spreadsheet. You won't see anything changed. But what you have done is to Define a Name.
You can now Apply it. Apply a Name To apply your new Name, click into cell B5 where your formula is, and do this:.
Named Ranges. Named Ranges provide meaning to the cells in an Excel worksheet. A named range can refer to a single cell, an area of cells or cells that are scattered throughout a worksheet. Named ranges can then be used in place of cryptic cell references in formulas and VBA code.
On the Named Cells panel, Click Name a Range. For Excel 2010 to 2016 users click Define Name. From the menu, select Apply Names. From the Apply Names dialogue box, select the Name you want and click OK: When you click OK, Excel should remove all those cell references between the round brackets, and replace them with the Name you defined: In the image above, cell B5 now says: =SUM(MonthlyTotals ) The cell references have been hidden. But Excel still knows about them - it's you that can't see them!
Exercise Study the spreadsheet below, now that we have added another Named Range to cell C5: Using the same techniques just outlined, create the same Named Range as in our image above. Again, the formula we've used is just a SUM formula: = SUM(C2:C4) You need to start with this, before you Define the Name and Apply it.
Using Named Ranges in Formulas We'll now use two Named Ranges to deduct the tax from our monthly totals. So, to define two new Names, do the following:. Click inside cell B5 to highlight it. From the Formulas menu bar, locate the Named Cells panel, and click Name a Range Name a Range (Excel 2007).
In Excel 2010 to 2016, click Define Name Define Name from the Defined Names panel. From the New Name dialogue box, click in to the Name textbox at the top and enter MonthlyResult (with the underscore character). Click OK.
Click inside cell C5 and do the same as step 2 above. This time, however, enter TaxResult as the Name You should now have two new Names defined. We'll now Apply these new names.
First, add a new label to your spreadsheet: Click in to cell B7, next to your new label, and enter the following formula: = B5 - C5 With the formula in place, we can Apply the two new Names we've just defined:. From the Formulas menu bar, locate the Named Cells panel, and click Name a Range Apply Names (Excel 2007). In Excel 2010 to 2016, click Define Name Apply Names from the Defined Names panel. The Apply Names dialogue box appears. Click MonthlyResult to select it. Click on TaxResult to select it:.
Click the OK button. Excel will replace your cell references with the two Names you Defined. Your spreadsheet should look like ours: If you look at the formula bar, you'll see the two Named Ranges. The formula is easier to read like this. But it's not terribly easy to set up!
They can be quite useful, though. In the next part, we'll take a look at how to set up your own custom names that you can use in formulas.