Data Analytics with Spreadsheets

Online B.Com · Sem 4

Lesson 1 of 5

Excel Lookup Functions and IF

Data Analytics with Spreadsheets

About the video

Excel Full Course for Data Analysis with Projects [ 2 Hours] | Excel Tutorial 2025

WsCube Tech

Study notes

Excel lookup functions retrieve values from tables based on a key. The main ones are VLOOKUP, HLOOKUP, INDEX/MATCH and XLOOKUP. The IF function returns different results depending on whether a logical test is true or false, and it is often combined with lookups for business analysis.

IF Function

  • Syntax: =IF(logical_test, value_if_true, value_if_false).
  • Example: =IF(B2>=50000,"Target Met","Below").
  • Nested IF handles multiple conditions: =IF(A2>90,"A",IF(A2>75,"B","C")).
  • Combine conditions with AND or OR: =IF(AND(A2>0,B2>0),"OK","Check").
  • IFS and IFERROR are related: =IFERROR(formula,"Not found").

VLOOKUP and HLOOKUP

  • Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]).
  • Use FALSE (0) for an exact match and TRUE for an approximate match. An approximate match needs the first column sorted ascending.
  • VLOOKUP searches only the leftmost column and returns values to the right of it.
  • HLOOKUP works the same way across rows, using row_index_num.
  • Lock table references with $ (e.g. $A$2:$D$100) before copying formulas.
  • The #N/A error means no match was found.

INDEX/MATCH and XLOOKUP

  • =INDEX(return_range, MATCH(lookup_value, lookup_range, 0)) can look left and is not broken by inserted columns.
  • MATCH returns the position of a value; a match_type of 0 means exact.
  • XLOOKUP syntax: =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found]). It does an exact match by default, works in any direction, and is available in Excel 365/2021.

Key terms

IF
Returns one of two values depending on whether a condition is true or false.
VLOOKUP
Vertical lookup that finds a value in the first column and returns a value from a specified column.
INDEX/MATCH
Flexible lookup combination that can return values from any column.
XLOOKUP
Modern lookup function with exact match as the default and a built-in not-found argument.
Absolute reference
A cell reference fixed with $ so it does not change when the formula is copied.

Takeaways

  • Use FALSE in VLOOKUP for exact matches, such as looking up codes or IDs.
  • VLOOKUP cannot look left; use INDEX/MATCH or XLOOKUP instead.
  • IF can be nested or combined with AND/OR, and IFERROR handles lookup errors.
Contribute

Was this lesson helpful?

We read every rating and fix the weakest lessons first.