"Excel VLookup and HLookup for beginners: A step-by-step guide"
The VLOOKUP and HLOOKUP functions in Excel are both used to perform lookups in a table of data, but they work in slightly different ways.
VLOOKUP, or "vertical lookup," searches for a specific value in the leftmost column of a table and returns a corresponding value in a specified column to the right. This function is useful when your data is organized in a "vertical" format, with each record taking up a single row.
For example, if you have a table of employee information with columns for name, employee ID, and salary, you could use VLOOKUP to find an employee's salary by searching for their ID number in the leftmost column.
HLOOKUP, or "horizontal lookup," works in a similar way, but searches for a specific value in the top row of a table and returns a corresponding value in a specified row below. This function is useful when your data is organized in a "horizontal" format, with each record taking up a single column.
For example, if you have a table of sales data with columns for different products and rows for different months, you could use HLOOKUP to find the sales for a specific product in a specific month.
To sum up, the main difference between VLOOKUP and HLOOKUP is the direction in which they search the table. VLOOKUP searches vertically, while HLOOKUP searches horizontally. Both functions are useful for finding specific information in a table of data, but you should choose the one that best matches the layout of your data.
VLookup Excel
A step-by-step guide:
- Open the Excel spreadsheet containing the data you want to use in the vlookup formula.
- Select the cell where you want the vlookup formula to be entered.
- Type "=VLOOKUP(" and then select the cell containing the value you want to look up.
- Type a comma and then select the range of cells containing the data you want to search through. Be sure to include the column containing the data you want to return in this range.
- Type another comma and then enter the number of the column containing the data you want to return. In this example, the data is in the second column of the range, so enter "2".
- Type another comma and then enter either "TRUE" or "FALSE". If you enter "TRUE", the vlookup formula will return an approximate match. If you enter "FALSE", the vlookup formula will return an exact match.
- Press "Enter" to complete the formula. The cell containing the formula will now display the data from the specified column that matches the value you looked up.
- Repeat steps 2-7 to use vlookup formula in other cells or columns.
Note: It is important to note that the first column of the table array should be the column which is being searched and the second column should be the column which is being returned.
HLookup Excel
A step-by-step guide:
- Open the Excel spreadsheet containing the data you want to use in the hlookup formula.
- Select the cell where you want the hlookup formula to be entered.
- Type "=HLOOKUP(" and then select the cell containing the value you want to look up.
- Type a comma and then select the range of cells containing the data you want to search through. Be sure to include the row containing the data you want to return in this range.
- Type another comma and then enter the number of the row containing the data you want to return. In this example, the data is in the second row of the range, so enter "2".
- Type another comma and then enter either "TRUE" or "FALSE". If you enter "TRUE", the hlookup formula will return an approximate match. If you enter "FALSE", the hlookup formula will return an exact match.
- Press "Enter" to complete the formula. The cell containing the formula will now display the data from the specified row that matches the value you looked up.
- Repeat steps 2-7 to use hlookup formula in other cells or rows.
Note: It is important to note that the first row of the table array should be the row which is being searched and the second row should be the row which is being returned.