Lookup functions allow Excel users to search for information in a dataset and return related values. Advanced functions can also be used to perform logical tests, conditional calculations, and more efficient data analysis.
Lookup functions search for a value in a table or range and return related information. They are useful when information is stored in one table and needs to be retrieved based on a unique identifier such as an employee ID, product code, customer ID, or invoice number.
VLOOKUP searches for a value in the first column of a selected table and returns a related value from another column in the same table.
A typical VLOOKUP structure is:
=VLOOKUP(lookup_value, table_array, col_index_num, FALSE)
For example, if a product code is entered into a worksheet, VLOOKUP can be used to retrieve the corresponding product name or price from a product table.
XLOOKUP is available in supported versions of Microsoft Excel and provides a flexible method for searching one range and returning a corresponding value from another range.
A basic structure is:
=XLOOKUP(lookup_value, lookup_array, return_array)
The exact availability of XLOOKUP depends on the Excel version or Microsoft 365 environment being used.
The IF function evaluates a condition and returns one result when the condition is true and another result when it is false.
A basic structure is:
=IF(condition, value_if_true, value_if_false)
For example, a marks worksheet can use IF to display Pass when a student’s marks meet the selected passing condition and Fail otherwise.
COUNTIF counts cells that meet a specified condition.
For example:
=COUNTIF(B2:B20,”Sales”)
This can be used to count records that match a selected department, category, status, or other criterion.
SUMIF adds values that meet a specified condition.
For example, a sales worksheet can use SUMIF to calculate the total sales generated by a particular salesperson or category.
Create two worksheets named Products and Sales.
In the Products worksheet, create the following columns:
In the Sales worksheet, create:
After completing this section, learners will be able to use lookup and advanced Excel functions to retrieve information, apply logical conditions, perform conditional calculations, and analyze related datasets efficiently.