0% found this document useful (0 votes)
15 views8 pages

Class 7 - Summary - Lookups in MS Excel-3998

The document provides an overview of lookup functions in MS Excel, focusing on VLOOKUP, HLOOKUP, and INDEX-MATCH. It explains the importance, syntax, and drawbacks of VLOOKUP, along with a brief introduction to HLOOKUP and the advantages of using INDEX-MATCH for more flexible data retrieval. The session aims to equip students with the skills to effectively use these functions for data analysis and merging datasets.

Uploaded by

Pradeesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views8 pages

Class 7 - Summary - Lookups in MS Excel-3998

The document provides an overview of lookup functions in MS Excel, focusing on VLOOKUP, HLOOKUP, and INDEX-MATCH. It explains the importance, syntax, and drawbacks of VLOOKUP, along with a brief introduction to HLOOKUP and the advantages of using INDEX-MATCH for more flexible data retrieval. The session aims to equip students with the skills to effectively use these functions for data analysis and merging datasets.

Uploaded by

Pradeesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

SUMMARY: LOOKUPS IN MS EXCEL

SESSION OVERVIEW:
By the end of this session, the students will be able to:
● Understand VLOOKUP function in detail which will include the importance,
drawbacks and the syntax of VLOOKUP.
● Understand HLOOKUP function in brief.
● Understand INDEX-MATCH functionality in excel.

KEY TOPICS AND EXAMPLES:

1. VLOOKUPs IN EXCEL:
a. Introduction (5 min):
In the previous lecture while working with the ABC company’s datasets, we noticed
that it was difficult to work on those tables without merging both the tables. Thus, we
will be understanding ways by which we can merge two or multiple tables for the
ease of understanding the datasets as a whole, get accurate insights and many more.

VLOOKUP is an abbreviation for vertical lookup. It is a powerful function in


Microsoft Excel used to search for a value in the first column of a table or range, and
then return a value in the same row from a specified column. It is one of the most
commonly used functions for data lookup and retrieval tasks in Excel.

b. Importance of VLOOKUP (5 min):


● Data Retrieval: VLOOKUP allows users to quickly retrieve specific
information from large datasets. This is particularly useful when dealing with
databases or spreadsheets with numerous records, as it eliminates the need for
manual searching.
● Efficiency: Using VLOOKUP saves time and effort by automating the
process of finding and retrieving data. Instead of manually scanning through
rows and columns, users can simply input the lookup value, and Excel will
handle the rest.
● Accuracy: VLOOKUP helps ensure accuracy in data retrieval by minimizing
the risk of human error. Since the function performs the lookup process based
on predefined criteria, there is less chance of mistakes compared to manual
methods.
● Versatility: VLOOKUP can be applied to various scenarios across different
industries and functions. Whether it's analyzing sales data, managing
inventory, or organizing employee information, the function provides a
versatile solution for data lookup tasks.
● Integration with Other Functions: VLOOKUP can be combined with other
Excel functions to perform more complex operations. For example, it can be
used in conjunction with IF functions to create dynamic lookup formulas that
return different results based on specified conditions.

1
● Scalability: VLOOKUP is scalable and can handle large datasets with ease.
Whether you're working with hundreds or thousands of records, the function
can efficiently retrieve the required information without compromising
performance.
● Ease of Use: Despite its powerful capabilities, VLOOKUP is relatively easy
to understand and use, even for users with basic Excel skills. This makes it
accessible to a wide range of users and allows for quick adoption in various
business environments.

c. Syntax of VLOOKUP with examples (5 min):

Figure: Represents the components in the VLOOKUP function in MS Excel

Parameters:

1. lookup_value: The value to search for in the first column of the table or
range.
This is the value you want to search for in the first column of your table or
range. It could be a number, text, or reference to a cell containing the value.
2. table_array: The table or range of cells where the data is stored. This should
include the column where the lookup value is found and the column from
which to retrieve the data.
This is the range of cells containing the data you want to search through. The
lookup value must be in the first column of this range.
3. col_index_num: The column number in the table_array from which to
retrieve the data. The first column in the table_array is 1.
For example, if the data you want is in the third column of the table array, the
column index number would be 3.
4. range_lookup (optional): A logical value that specifies whether to perform
an exact or approximate match. If TRUE or omitted, an approximate match is
performed. If FALSE, an exact match is required.

Example:

In this example:
● The cell ‘A2’ contains the employee ID you want to look up.
● EmployeeTable is the range of cells containing the employee ID in the first
column and their names in the second column.

2
● 2 specifies that you want to retrieve the name from the second column of the
EmployeeTable.
● FALSE specifies that you want an exact match for the employee ID.

d. Different types of VLOOKUPs in MS Excel (10 min):


i. VLOOKUP from same sheet:
Example: This dataset will be used to showcase the VLOOKUP function
from the same sheet.
For this type of VLOOKUP, we can directly mention the formula that we
have used above.

ii. VLOOKUP from another worksheet, same workbook:


The most common way VLOOKUP is done is when the data is present in two
different sheets in the same workbook. To do VLOOKUP from a different
sheet - We put the worksheet's name followed by an exclamation mark in the
table_array argument before the range reference.
If the spreadsheet name contains spaces or is non-alphabetical characters, it
must be enclosed in single quotation marks, e.g., 'Price list'!$A$2:$C$9.
Formula: =VLOOKUP(lookup_value, ‘Sheet2’!cell range, 2, False)
To lock any cell value or any column, we do this by using the “$” sign to lock
any cell value or any column.

STEPS:
● Click on the first cell of your target column (where you want the
VLOOKUP results to appear).
● Type =VLOOKUP, followed by opening parentheses.
● Next, select the cell containing the value you want to lookup
● Select the second sheet tab. Select the range of cells that you want
VLOOKUP to search in. The range of cells that we will be
referencing to need to be absolute, means addition of the $ sign is
required. Example, if we have a range of cells A2:E40, to apply
absolute referencing we it must be $A$2:$E$40.
● Put a comma, followed by the index of the column that contains the
values you want to retrieve
● Finally, close the parentheses.

This Dataset-1(contains table-1 and the final table after merging) and dataset-2
(contains table-2 which was merged with table-1) can be used to showcase the
VLOOKUP function from another sheet but the same workbook.

iii. VLOOKUP from another workbook:


(Dataset)
STEPS:
● Click on the first cell of your target column (where you want the
VLOOKUP results to appear).
● Type =VLOOKUP, followed by opening parentheses.
● Next, select the cell containing the value you want to lookup

3
● Open the second workbook. Select the range of cells that you want
VLOOKUP to search in. The range of cells that we will be
referencing to need to be absolute, means addition of the $ sign is
required.
● Put a comma, followed by the index of the column that contains the
values you want to retrieve.
● Finally, close the parentheses.

NOTE: This is how the formula looks when we merge two tables from two
different workbooks.
datasets.

e. Possible errors that can occur (5 min):


i. #REF! - If your function's Col_Index_Num is larger than the number of
columns in your Table_Array, your VLOOKUP function will return a #REF!
error.
ii. #VALUE! - If your function's Col_Index_Num is less than 1, your
VLOOKUP function will return a #VALUE! error.
iii. #N/A - If you input FALSE (or 0) for your Range_Lookup parameter and no
exact match can be found, your VLOOKUP function will return a #N/A error.

f. Drawbacks of VLOOKUPs in MS Excel (10 min):


● Limited to Vertical Lookup: VLOOKUP only allows users to search for
values in the first column of a table or range and retrieve corresponding
values from adjacent columns to the right. This limitation restricts its
flexibility in certain scenarios where data is organized differently.
● Exact Match Requirement: By default, VLOOKUP performs approximate
matches, meaning it looks for the closest value to the lookup value if an exact
match is not found. This can lead to unexpected results if users forget to
specify an exact match by setting the range_lookup argument to FALSE.
● Column Index Dependency: When using VLOOKUP, the column index
number must be manually adjusted if the structure of the table array changes.
If a new column is inserted or deleted, the column index number in the
formula may become outdated, potentially leading to errors in the lookup
results.
● Not Dynamic: VLOOKUP formulas are not dynamic by default, meaning
they do not automatically adjust if the table array expands or contracts. Users
must manually update the range references in the formula to accommodate
changes in the dataset, which can be cumbersome in dynamic environments.
● Performance Issues with Large Datasets: VLOOKUP may experience
performance issues when used with very large datasets, particularly if the

4
table array contains a significant number of rows. In such cases, users may
experience slower calculation times, especially if the formula is used
extensively throughout a workbook.
● Inability to Look Left: Unlike HLOOKUP (Horizontal Lookup), which
searches for values in the first row of a table array and retrieves values from
rows below, VLOOKUP cannot perform leftward lookups. This means users
cannot retrieve values from columns to the left of the lookup column without
restructuring the data.

2. HLOOKUPs IN EXCEL(10 min):


a. Introduction:
HLOOKUP stands for Horizontal Lookup and can be used to retrieve information
from a table by searching a row for the matching data and outputting from the
corresponding column.

b. Syntax of HLOOKUP with example:


HLOOKUP function in Excel comes with the following arguments:
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Example: (Dataset)
Let’s consider the example mentioned below.

Now if our objective is to fetch the data for the student D in management then we can
use HLOOKUP as follows:

Now, to populate the desired variables in the formula, we will select variables as
follows:

5
The output for the following will be as follows:

c. Why HLOOKUPs are less widely used in industry:


● Data Organization: In most business scenarios, data is typically organized in
a vertical format, with each row representing a record or transaction, and each
column representing a different attribute or variable. As a result, VLOOKUP
is more aligned with the structure of business data and is easier to implement
for data analysis tasks.
● Performance: VLOOKUP tends to perform better than HLOOKUP,
especially with large datasets. HLOOKUP requires searching through a
horizontal row, which can be slower and less efficient compared to the
vertical search performed by VLOOKUP.

3. INDEX-MATCH (25 min):


a. Introduction and syntax:
● Flexibility: Unlike VLOOKUP and HLOOKUP, which are limited to vertical
and horizontal searches respectively, INDEX-MATCH provides the flexibility
to perform both vertical and horizontal lookups. This versatility is invaluable
when dealing with datasets that are not structured in a strictly vertical or
horizontal manner.
● Improved Performance: INDEX-MATCH often outperforms VLOOKUP
and HLOOKUP in terms of speed and efficiency, especially with large
datasets. This is because INDEX-MATCH doesn't rely on column or row

6
indices like VLOOKUP and HLOOKUP, but instead uses a more dynamic
and efficient matching mechanism.
● No Limitation on Lookup Column: VLOOKUP restricts the lookup value
to the leftmost column of the lookup range, while HLOOKUP restricts it to
the top row. INDEX-MATCH imposes no such limitation, allowing users to
search for values in any column or row within the specified range.
● Better Handling of Dynamic Data: VLOOKUP and HLOOKUP struggle
with dynamic datasets where the lookup value's position may change.
INDEX-MATCH excels in such scenarios, as it dynamically adjusts to
changes in the dataset without requiring manual adjustments.

● Enhanced Accuracy: INDEX-MATCH eliminates the risk of selecting


incorrect columns or rows, a common pitfall with VLOOKUP and
HLOOKUP, as it directly references the target cell based on matching criteria,
rather than relying on fixed indices.

The INDEX-MATCH formula is a combination of two formulas, INDEX function


and MATCH function.

=INDEX() returns the value of a cell in a table based on the column and row
number.
=MATCH() returns the position of a cell in a row or column.

b. INDEX function:
The INDEX function in Excel is used to retrieve a value from a specified range of
cells based on its row and column numbers. It's particularly useful for dynamic data
retrieval and manipulation.

Figure: Represents the index function in MS Excel

Let’s consider the following example to understand INDEX: (Dataset)

c. MATCH function: (Dataset)


The MATCH function in Excel is used to find the relative position of a specified
value within a range of cells. It's commonly used in conjunction with other functions,
such as INDEX or VLOOKUP, to perform advanced data retrieval and manipulation
tasks.

7
Figure: Represents the MATCH function in Excel

d. Combination of INDEX-MATCH functionality: (Dataset)


The combination of the INDEX and MATCH functions in Excel is a powerful tool for
performing advanced data retrieval and manipulation tasks. This combination allows
you to dynamically look up values within a range based on specific criteria.

● return_range: This is the range of cells from which you want to retrieve the
result.
● lookup_value: This is the value you want to find within the lookup_range.
● lookup_range: This is the range of cells where you want to search for the
lookup_value.
● [match_type]: [Optional] This argument specifies the type of match you
want to perform, similar to the MATCH function.

dataset

4. Merging the ABC DATASETS (20 min):


This Dataset will be used to explain the merging of both datasets in ABC company.

dataset

You might also like