transcript

excelisfun - Excel Basics 18: Defined Names in Excel Formulas & Functions & For Jump Go To!

Thumbnail of the video “excelisfun - Excel Basics 18: Defined Names in Excel Formulas & Functions & For Jump Go To!”
Download Markdown
Community upload. AI output has not been independently verified.

Welcome to Excel Basics video number 18. In this video we are going to talk about the Define Name feature and how to use defined names in Excel formulas, functions, and for Jump Go To. We will learn how to name ranges and then use those names in formulas. We will see our list of names in the Name Manager, and we will also see how to use defined names to jump to various ledger accounts in your Excel workbook.

Let's go over to the sheet on Define Names. Defined names are great. We are going to use the PMT function to calculate our monthly payment, but inside our formula it would be nice, instead of seeing B3, B4, B5, to see the name of the variable. You can select a range or a single cell and name it anything you want. I am going to click in B3, and up here in the formula bar is the Name Box. If I click there, I can type any name, and now that cell will have that name instead of B3. I am going to type "loan amount," but spaces will not work. If you want a space, you have to use an underscore. When I hit Enter, the cell is named. If I click over here I see C5, and when I click back there I see loan amount. If I click in a cell, click the drop-down, and select loan amount, it jumps to that cell.

Now I am going to show you where your list of defined names is. We go up to Formulas, Defined Names, and there it is: Name Manager. The keyboard shortcut is Ctrl+F3. If I click this, it will show me that we only have one name. There is the name, there is the value, there is the range it refers to, and the scope. If you have the same name in multiple places in your workbook, the scope tells you whether the name is for the whole workbook or for the particular worksheet. I am going to delete this. By the way, you can edit or create a new one here, but I am going to delete it because I forgot to show you a better trick than naming them manually. Click OK, then Close.

Almost all the times I have used defined names, I have the actual name directly to the left, and there is a feature that will automatically name these. Not only that, but when we get down here, this whole column has the name at the top. So there is a great feature: you highlight the names and any numbers or cells that you want to contain those names, go up to Defined Names, and there it is: Create from Selection. The keyboard shortcut is Ctrl+Shift+F3. I am going to use Create from Selection. You have to be careful and read this, because sometimes they will check the wrong box, but this has no problem interpreting number and text. The helpful thing about Create Names from Selection is that when there is a space in the label, it will automatically put an underscore right there. I did not put a space, so it will be exactly that name when I click OK.

Now, in the drop-down, there is my loan_amount. There is the total_months. I can come down here and use those defined names in a formula. Equals PMT, which we learned earlier in the class, is great for calculating a periodic loan payment. The rate, I am simply going to click, and look, it puts monthly_rate, comma. That is the total number of periods. I click total_months, comma, and I click loan_amount. That is a pretty awesome formula. If I close the parenthesis, someone looking at this can literally read it left to right and understand what is going on. When I hit Enter, there is the monthly payment.

One other cool thing about defined names: I can come up to the Name Manager, and I want to be consistent with an underscore, so I am going to click on total months and add an underscore. Click OK, then Close. I do not get an error there. Press F2 and it will totally update.

Now let's come down here. I want to name these three columns. I am highlighting the names at the top, and all of the data below it will be interpreted as the whole column. The whole column is Date, the whole column is Sales. Create from Selection, or use the keyboard shortcut Ctrl+Shift+F3. Be careful, because it definitely checks the wrong thing sometimes. I do not want the left column, meaning each one of these dates, to be the name of this row, so I simply make sure the top row is selected and click OK. Now I can come over to my drop-down, and sure enough, there is Sales.

There is a drawback to defined names: they are not dynamic like the Excel Table feature. If I add new records, that will not automatically update. You can go edit it, but it will not update like an Excel Table. If I am using data sets like this, I tend to use the Excel Table feature now. But I have to show you defined names, because this example up here is a great use that we still use all the time, and you may bump into spreadsheets where people use defined names, so it is good to know what they are and how to use them.

Our goal here is to add, with the SUMIFS function, not all the sales but just the sales for Jo, GG, and Chin. In the sum range, I can either highlight the column, and notice it will automatically put the defined name in, or use the criteria range. I know I want Sales Rep. I can start typing, and from my drop-down I can see the fx icon, which means function, the gold dog tag, which means defined name. You will also see the table icon and table names in this drop-down, as we saw in an earlier video. Now I am going to down arrow and tab to get Sales_Rep. I type a comma and criteria 1, then close the parenthesis, and there it is. Defined names in formulas are not only that, but they are totally locked and absolute by default. When I press Ctrl+Enter and copy it down, go to the last cell and hit F2, they are totally locked, pointing to the correct Sales and Sales Rep columns.

Another great use for defined names, and for that matter the Table feature with its table formula nomenclature, is that I am going to use this column over and over again. Instead of always having to do different formulas and highlight the range, I can simply use our defined name. Alt+Equals is the keyboard shortcut for the SUM function. I type the letter S and see Sales highlighted in my drop-down, tab, and enter. Equals COUNT: I want to count how many sales we had. Type S and I see Sales there, so I hit Tab. Here is a great trick: this is a simple function with a single argument, so we actually do not have to type the closing parenthesis. If I press Ctrl+Enter and look in the formula bar, you can see it put it in for us. Enter equals MAX of Sales, Tab, then Enter, and it will put in the parenthesis for me, and sure enough it got the max. Equals MIN, Tab, Sales, Tab, and Enter. So I use defined names to quickly enter a range when I am doing various calculations.

Our last example, which I love and use all the time in large workbooks, uses defined names to jump to a certain ledger account. Over here I have the Cash account, A, our Sales, and for each one of these I want to give a particular cell a name so I can use the drop-down in the Defined Names box to jump to a particular range. I am going to select J1 on each one of these sheets, click up in the Name Box, and call this one Cash, then Enter. Now I am going to jump over to A, click in J1, click up in the Name Box, type A, R, and Enter. Come over to Sales. I already have a range called Sales, so I am going to come over here, click in the Name Box, and call this Sales_400 because that is the number on this account, then Enter.

Notice I am on the Sales sheet. If I want to jump to the Cash account, I simply select it, and instantly I jump over to Cash. Jump to A, R, and there I am on A R. If I want to jump back to the defined name sheet where we started, and I want to jump to the Sales Rep column, I simply click it, and there I have jumped to that defined name.

We saw how to create defined names to use in formulas with the awesome Create from Selection feature, and that it is sometimes convenient to have our cells named in our formulas. We saw how to name each one of these columns and then use them in SUMIFS. We saw that defined names or Table formula nomenclature from the Table feature are great when you are using the same range over and over. We also talked about the limitation of defined names: they are not dynamic, although you can go up and edit them if you have to. Then we saw how to use defined names to jump to a certain ledger account.

If you liked that video, be sure to click that thumbs up, leave a comment, and subscribe, because there are always lots more videos to come from excelisfun. We will see you in the next Excel Basics video.