Hello, as a continuation of the previous discussion, where we were talking about the basics of index formula, this time, take care of experiment number two. Now by now you would be wondering where the index formula could actually be applied. And this will be the starting of the answer seeking exercise. We have three columns, so Jan FEHB March and each of them has two numbers space below it. So that Jan 12534 months Five, six, now, we want a mechanism by which if I change the yellow cells to let's say, m er I should be getting answer 11. If I write FEHB, then I should get an answer us seven basically some of the numbers underneath it.
Now one option could be that you start using if people do that, they say, if the cell is equal to fab then in that case it should fetch me a summation of these two values. Perfect is please go ahead ask another question. If the same sell a 15 is equal to j n.in double quotation, then in that case sum should be based on these two values, he else some should be based on the AMA are closing the brackets once, once again, once again, and that's the formula. Now, notice just for three months, the formula length is so large. Imagine if you had 12 months data, the length of the formula would have been four times this. So we want to fast and easy mechanism which gives us the answer in a very small and easy formula.
And the main point is it should not increase in length the moment more months come into the picture. Now let's see how to achieve this. First, I'm going to choose these one and two, and named this as g n You can use uppercase lowercase in writing the name gn, but make sure that after writing the name, you press enter. If you have these two cells APB into these two cells, I'm writing m ER and pressing Enter. So, Henceforth, I have three more names said pointing to these two cells, Jan pointing to these two and march Mar, two these cells. So now, what if I write some formula and this sum needs a location from where the numbers must be picked for totaling up now the location is depend on the jello cell.
Basically, this is the desk where address chip is mentioned. If address changes, the sum formula will go to a different address, but who will lead me to this address the concept of redirection that is going to be given by indirect formula, so indirect, go to this particular cell that contains the address it, and this will tell you where to go. So as of now five is pointing to where three and four. And because of which I'm getting seven. By the way, if you wanted to know what is going on in excels mind, you can simply choose the indirect formula, right starting, starting right from I ending till the bracket of indirect and pressing function key f nine. So the moment I change this to Jan, I get three, the moment I change this to Mr.
I'm getting five plus six. So internally what is happening in red is a formula which is going to this desk it is taking the address and going to the right location. And these two numbers once it is fair to the sum formula, it quickly adds up the numbers. Now, you might tell me, Look, if there are nine more months of data, do I need to name these two cells respectively for all the remaining nine months? No. Let's see fast how this can be done.
Let's see I have data till December. And what I'm doing is I'm simply going to add plus one To the previous cells so that we populate a random set of numbers for our exercise, now, instead of naming them individually as APR me yg NGU l, I can choose the entire block, including the name. As discussed in one of the previous videos with respect to names, mass name or bulk naming, we have a technique with us that is, you go to the Formulas tab and there is a button called create from selection. Primarily, it points to the fact that you can create the names from the selected area. So I click on Create from selection. And it says Create names from selection and take the names from where from the top row five press OK.
It seems that nothing has happened on my screen. But you know more. Let's look at the drop down of the name box. Whoa. I'm getting all the names of the month in the T letter format, which has begin in the heading just for testing. If I put let's say j u l mm despite this He says and to make the formula work, I will simply modify the drop down list such that it incorporates other nine months.
So, I go to the yellow cell data within which look for data validation, click on Data Validation the items suggest that allow a list but the source is restricted to only these T cells. So, let me change those three selections right from Jan till December. And as I press OK, this drop down has all the 12 months value, if I now choose AG, let me check 10 plus 1121. So, there you go with the same length of that formula, we are able to derive an answer right from Jan till December. This is using the technique of indirect and naming and which will use it in a much more powerful manner in the next few videos. Till then practice this exercise where we also saw how to bulk name a particular range