How to automatically display names when entering code in Excel

Instead of entering names and entering code in Excel, users can combine the IF and Vlookup functions to automatically display the name when entering the code.

When working with Excel name list tables, how many people in a table will be very much and what if you want to find that person's information? It is not feasible to search manually for each name. The method using Ctr + F key and entering the name of the employee who wants to find information is also chosen by many people. But this case only applies to tables that do not have the same name. So how to find the quick information of anyone in the name table on Excel?

In this case, we can combine the IF function and the Vlookup function. Then we will assign each person in the table a separate code. And when entering any code, the person's information will automatically appear. So managing employees, or students on Excel, will be much easier.

  1. How to combine Sumif and Vlookup functions in Excel
  2. How to use the SUMIF function in Excel
  3. How to use Vlookup function in Excel

How to automatically display names when entering code in Excel

We will work with student tables as shown below. The requirement is to have a student code in Table 2, entering the code in Table 1 will automatically show the student name with that code.

How to automatically display names when entering code in Excel Picture 1How to automatically display names when entering code in Excel Picture 1

Step 1:

In the Name column in Table 1, we will enter the formula below and press Enter = IF (B4 = '' '', '' '', VLOOKUP (B4, $ F $ 4: $ G $ 7.2,0 )) .

Inside:

  1. B4 is the student code column in Table 1.
  2. F4 is the student code column in Table 2.
  3. G7 is the last name column in Table 2.
  4. $ Character to fix column or row in Excel table.

How to automatically display names when entering code in Excel Picture 2How to automatically display names when entering code in Excel Picture 2

When pressing Enter, we will get the function symbol in the table as shown below.

How to automatically display names when entering code in Excel Picture 3How to automatically display names when entering code in Excel Picture 3

Step 2:

Next, you highlight the Code and column columns. They are named in Table 2 for reference data for the formula. Then, place the mouse pointer in the formula entered in Table 1, and then drag it down to the lower cell to match the number of students to copy the Excel formula .

Thus, the formula for combining IF and Vlookup has been applied to all cells in the Last Name column in Table 1.

How to automatically display names when entering code in Excel Picture 4How to automatically display names when entering code in Excel Picture 4

Step 3:

Now in Table 1, press the M1 code in the Code column and press Enter , immediately the student name associated with that code will be displayed in the Last name column in Table 1.

How to automatically display names when entering code in Excel Picture 5How to automatically display names when entering code in Excel Picture 5

Finally, you just need to enter the code again, or drag the results to the remaining cells to complete the name table. Student codes and names will also be automatically displayed.

How to automatically display names when entering code in Excel Picture 6How to automatically display names when entering code in Excel Picture 6

By combining such IF and VLupup functions, displaying information in Excel data tables is much faster and simpler. We also do not need to manually detect, or find again with the case of the same name. The student name will automatically be displayed according to the student code assigned.

See more:

  1. How to use AVERAGEIF function in Excel
  2. This is a simple way to find and delete Hyperlink in Excel
  3. How to use the LEN function in Excel

I wish you all success!

4.1 ★ | 26 Vote