This simple example I want to teach about how to get representative cell value automatically. If there is a lot of data in the excel then it is difficult to remember representative value.
For example look at the picture below. There are 3 records you can see in Table 1. As you can see ID No. 2003 belongs to Andrew Howell. Suppose you have next Table 2 which has extra column and you need to get represented Name of given ID No. To get this value in easy way, you have to use a simple formula of =VLOOKUP(vlookup_value, table_array, col_index_num, [range_lookup]). In this formula =VLOOKUP is a name of function, vlookup_value represents the cell value which you want to look up the represented value for, table_array represents the table where is the represented values are stored, col_index_num represents for the number of column of table where you want to get represented value from and range_lookup represents for TRUE or FALSE. If you put TRUE it will give a approximate match value and if you put FALSE, it will give exact match value.
- Create a simple Table 1 as shown the picture above.
- Select cells and give name in Name Box as TableA to represent the selected cells or table. (Note: Name Box is the space before Formula Bar where you can see the selected cell name. In the Picture above you can see it is written as I25 before Formula Bar that is the Name Box. You can change the name from I25 to TableA or any name as you want. After changing it you need to hit the ENTER.)
- Create next Table at right side after leaving a column as shown in the picture above.
- Select cell E2 and type a formula like: =VLOOKUP(D2,TableA,2,FALSE). This formula represents as what ever you type in cell D2, it will check the represented value from TableA and takes the value from column 2 of TableA.
- If the value is not matched then the result will be #N/A and if the value is matched you will see the correct result.
- To update the formula next to down cell, just drag the cell as much as you need.
No comments:
Post a Comment
Comment form Message