<DataInsights />
  • 🏠 Home
  • 📊 SQL
  • 🐍 Python
  • 📈 Power BI
  • 📗 Excel
  • 💼 Career
  • 🎯 Interview Q&A
  • 📁 Case Study
  • 📥 Downloads
  • 🚀 My Portfolio
<DataInsights />

Practical Data Analytics tutorials covering SQL, Python, Power BI, Excel and career guidance for aspiring analysts — 100% free.

Topics

  • SQL Tutorials
  • Python Guide
  • Power BI
  • Excel Tips
  • Career Guide

Quick Links

  • 🛠️ All Tools
  • 🗓️ Archive
  • 📬 Contact
  • 🔍 Search
  • Portfolio
  • Kaggle
  • GitHub

Legal & Info

  • About
  • Contact
  • Privacy Policy
  • Disclaimer
  • Terms & Conditions
  • DMCA
  • Sitemap
Copyright © 2026 Data Insights by Jatin Kumar. All Rights Reserved.Built with ❤️ for Data Analysts
Home/Excel/Lookup Functions...

Lookup Functions

A
August 3, 2026 Jatin Kumar 36 min read Excel
Data Insights Excel Masterclass — Part 2

Lookup & Reference Functions — Complete Guide (10 Formulas)

Excel ke sabse powerful formulas — Lookup Functions. VLOOKUP se lekar XLOOKUP tak, INDEX+MATCH se OFFSET tak — real-world data lookup problems solve karo step-by-step Data Insights par.

📑 Is Part 2 Mein Aap Kya Sikhenge:

  • Topic 1: VLOOKUP — Vertical Lookup
  • Topic 2: HLOOKUP — Horizontal Lookup
  • Topic 3: INDEX — Value from Position
  • Topic 4: MATCH — Find Position of Value
  • Topic 5: INDEX + MATCH Combo — VLOOKUP ka Better Version
  • Topic 6: XLOOKUP — Modern Lookup Function
  • Topic 7: CHOOSE — Select from List
  • Topic 8: INDIRECT — Dynamic Cell Reference
  • Topic 9: OFFSET — Reference from Starting Point
  • Topic 10: ROW, COLUMN, ROWS, COLUMNS — Position Functions

📋 Note: Is Part 2 mein Employee Database (Part 1 wali) + ek naya Department Master table use karenge. Dono tables ke beech lookup karke real-world scenarios solve karenge.

Sample Data — Two Tables

📊 Table 1: Employee Data (Sheet1 — A1:G11)

EmpID Name Dept City Salary Join Date Age
101RahulITDelhi7500015-Mar-2128
102PriyaHRMumbai8500001-Jul-2032
103AmitSalesDelhi4800010-Jan-2225
104SnehaITBangalore9200020-Nov-1935
105RaviHRChennai5300005-Sep-2129
106KavitaSalesMumbai4500014-Feb-2324
107DeepakFinanceDelhi6800030-May-2031
108AnjaliITBangalore9500012-Aug-1838
109SureshSalesChennai5100020-Jun-2227
110NehaFinanceMumbai7100018-Apr-1936

📊 Table 2: Department Master (Sheet2 — A1:D5)

Dept Head Location Budget
ITRajesh VermaBangalore5000000
HRSunita PatilMumbai2000000
SalesVikram RaoDelhi3500000
FinanceAnanya KumarChennai2500000

1. VLOOKUP — Vertical Lookup

text

🔍 Definition: VLOOKUP (Vertical LOOKUP) searches for a value in the leftmost column of a table and returns a value from a specified column in the same row. It is one of the most used Excel functions for data lookup and merging information from different tables.

🎯 Samjho Simple Bhasha Mein: VLOOKUP ek phone directory ki tarah kaam karta hai. Socho tumhare paas Employee ID hai (101) aur uska naam dhundhna hai. VLOOKUP kya karega — Employee table ke pehle column mein 101 dhundhega, aur us row ka 2nd column (Name) return karega. Bas isi tarah — ek value do, dusri value milegi!

💡 VLOOKUP Syntax:

=VLOOKUP(lookup_value, table_array, col_index, [range_lookup])

lookup_value: Jo value dhundhni hai (e.g., 101)
table_array: Table jismein dhundhna hai (e.g., A2:G11)
col_index: Kaunsa column return karna hai (1, 2, 3...)
range_lookup: FALSE = exact match, TRUE = approximate

Hamesha FALSE use karo exact match ke liye!

💻 Real-World Examples:

Example 1: Employee ID se Name nikalna.

// Cell I2 mein Employee ID: 104

// Cell J2 mein VLOOKUP formula:

=VLOOKUP(I2, A2:G11, 2, FALSE)

// Explanation:

// I2 → 104 (Employee ID to search)

// A2:G11 → Employee table range

// 2 → 2nd column (Name)

// FALSE → Exact match

// Result: Sneha

Example 2: Employee ID se Salary nikalna.

// Multiple lookups from same table:
=VLOOKUP(104, A2:G11, 2, FALSE) // Sneha (Name)
=VLOOKUP(104, A2:G11, 3, FALSE) // IT (Dept)
=VLOOKUP(104, A2:G11, 4, FALSE) // Bangalore (City)
=VLOOKUP(104, A2:G11, 5, FALSE) // 92000 (Salary)
=VLOOKUP(104, A2:G11, 7, FALSE) // 35 (Age)

Example 3: Cross-sheet lookup — Employee ke Department se Head aur Budget nikalna.

// Rahul ka Dept "IT" hai (Sheet1 mein)

// Uske Dept Head aur Budget nikalna hai (Sheet2 se)

// Column H2 mein Dept Head:
=VLOOKUP(C2, Sheet2!A2:D5, 2, FALSE)

// Result: Rajesh Verma

// Column I2 mein Budget:
=VLOOKUP(C2, Sheet2!A2:D5, 4, FALSE)

// Result: 5000000

// Drag down for all employees!

⚡ Critical Rule: VLOOKUP sirf LEFT to RIGHT lookup karta hai! Matlab lookup_value hamesha table ke PEHLE column mein hona chahiye. Agar tumhe right column se left return chahiye — toh INDEX+MATCH use karo (Topic 5)!

📊 Expected Output — Practice Table:

Formula in Cell Result
=VLOOKUP(101, A2:G11, 2, FALSE)Rahul
=VLOOKUP(108, A2:G11, 3, FALSE)IT
=VLOOKUP(105, A2:G11, 5, FALSE)53000
=VLOOKUP(999, A2:G11, 2, FALSE)#N/A (not found)

⚠️ Common Mistakes:

  • Mistake: range_lookup mein TRUE use karna — Approximate match kar deta hai, wrong results!
    Fix: Hamesha FALSE ya 0 use karo exact match ke liye.
  • Mistake: Formula copy karne par table range shift ho jaana → A2:G11 ban jaata hai A3:G12.
    Fix: Absolute reference use karo: $A$2:$G$11 (F4 dabao).
  • Mistake: Lookup value column table ke pehle column mein nahi hai → VLOOKUP fail karega!
    Fix: Table ko rearrange karo ya INDEX+MATCH use karo.
  • Mistake: #N/A error handle na karna → Report mein ugly dikhta hai.
    Fix: IFERROR wrap karo: =IFERROR(VLOOKUP(...), "Not Found")

💬 Interview Questions:

Q1: What is VLOOKUP and what are its arguments?
Ans: VLOOKUP (Vertical Lookup) searches for a value in the leftmost column of a table and returns a value from another column in the same row. It has 4 arguments: (1) lookup_value — what to search, (2) table_array — where to search, (3) col_index_num — which column to return (counted from left), (4) range_lookup — FALSE for exact match, TRUE for approximate. Example: =VLOOKUP(101, A2:G11, 2, FALSE) finds ID 101 and returns the 2nd column value.

Q2: Can VLOOKUP look to the left?
Ans: No, VLOOKUP can only look to the RIGHT of the lookup column. The lookup value must be in the leftmost column of the table, and the return column must be to the right. To lookup values to the left, use INDEX+MATCH combination or the modern XLOOKUP function which supports both directions.

Q3: What is the difference between TRUE and FALSE in VLOOKUP's last argument?
Ans: FALSE (or 0) means exact match — returns error if lookup value is not found exactly. TRUE (or 1, or omitted) means approximate match — finds the largest value less than or equal to lookup value, requires the lookup column to be sorted ascending. In 99% of business scenarios, use FALSE for exact match. TRUE is only used for grade calculations, tax brackets, or commission tiers.

2. HLOOKUP — Horizontal Lookup

text

🔍 Definition: HLOOKUP (Horizontal LOOKUP) searches for a value in the TOP row of a table and returns a value from a specified row in the same column. It works exactly like VLOOKUP but horizontally — used when data is arranged in rows instead of columns.

🎯 Samjho Simple Bhasha Mein: HLOOKUP wahi kaam karta hai jo VLOOKUP karta hai — bas 90 degree ghumaa ke! VLOOKUP columns mein search karta hai (top to bottom), HLOOKUP rows mein search karta hai (left to right). Real world mein HLOOKUP kam use hota hai kyunki data ki tables mostly vertical hoti hain. But quarterly reports ya month-wise data horizontal ho toh HLOOKUP kaam aata hai.

💡 HLOOKUP Syntax:

=HLOOKUP(lookup_value, table_array, row_index, [range_lookup])

lookup_value: Jo value dhundhni hai
table_array: Table jismein dhundhna hai
row_index: Kaunsi row return karni hai (1, 2, 3...)
range_lookup: FALSE = exact, TRUE = approximate

💻 Real-World Examples:

Example 1: Quarterly Sales Data — HLOOKUP se specific quarter ka sales nikalna.

Sample Data (Horizontal Table — A1:E4):

Product Q1 Q2 Q3 Q4
Laptop50000650007200080000
Mobile40000450005500060000
Tablet20000250003000035000
// Find Q3 header ka Laptop sales:
=HLOOKUP("Q3", A1:E4, 2, FALSE)

// Explanation:

// "Q3" → Search in top row

// A1:E4 → Table range

// 2 → Return 2nd row (Laptop)

// FALSE → Exact match

// Result: 72000

// Find Q2 sales for Mobile (3rd row):
=HLOOKUP("Q2", A1:E4, 3, FALSE)

// Result: 45000

// Find Q4 sales for Tablet (4th row):
=HLOOKUP("Q4", A1:E4, 4, FALSE)

// Result: 35000

Example 2: Dynamic quarter lookup using cell reference.

// Cell G1 mein "Q2" type karo
// Cell G2 mein formula:

=HLOOKUP(G1, A1:E4, 2, FALSE)
// Result: 65000 (Laptop Q2 sales)

// G1 mein quarter change karo — result automatically
update!

⚠️ Common Mistakes:

  • Mistake: row_index bhool jaana ya wrong dena → Wrong row ka data milta hai.
    Fix: Row count karo top se — header row = 1, first data row = 2.
  • Mistake: Data horizontal nahi hai but HLOOKUP use karna → Use VLOOKUP for vertical data.
    Fix: Rule yaad rakho: HLOOKUP = Horizontal data. VLOOKUP = Vertical data.
  • Mistake: Text lookup mein quotes bhool jaana → =HLOOKUP(Q2, ...) Q2 ko cell reference samajh lega!
    Fix: String literal ke liye quotes zaroori: =HLOOKUP("Q2", ...)

💬 Interview Questions:

Q1: What is the difference between VLOOKUP and HLOOKUP?
Ans: VLOOKUP searches vertically — looks for value in the leftmost column and returns from a column to the right. HLOOKUP searches horizontally — looks for value in the top row and returns from a row below. VLOOKUP uses col_index (column number). HLOOKUP uses row_index (row number). Both have identical syntax otherwise. Choose based on your data orientation.

Q2: When is HLOOKUP preferred over VLOOKUP?
Ans: HLOOKUP is preferred when data is arranged horizontally — like quarterly sales, monthly targets, year-wise growth data where months/quarters/years are column headers and metrics are in rows. In practice, HLOOKUP is less commonly used because most business data is arranged vertically. Modern practice: use XLOOKUP which handles both directions with a single formula.

3. INDEX — Value from Position

text

🔍 Definition: INDEX returns the value at a specific row and column intersection within a range. It works like coordinates — give row number and column number, get the value at that position. INDEX is more flexible than VLOOKUP and forms half of the powerful INDEX+MATCH combo.

🎯 Samjho Simple Bhasha Mein: INDEX ek GPS coordinate system ki tarah kaam karta hai. Socho ek chess board hai — tum bolo "row 3, column 5" — INDEX us specific square ka piece bata dega. Excel mein: =INDEX(A1:E10, 3, 2) matlab is range ki row 3 aur column 2 ki value do. Simple aur direct — koi search nahi, sirf position se value.

💡 INDEX Syntax:

=INDEX(array, row_num, [col_num])

array: Range jahan se value chahiye
row_num: Kaunsi row ki value (1 se start)
col_num: Kaunsa column (optional if single column)

Two forms:
Single row/column: =INDEX(A1:A10, 5) — 5th value
2D range: =INDEX(A1:E10, 3, 2) — row 3, col 2

💻 Real-World Examples:

Example 1: Employee data se specific position ki value nikalna.

// Employee table: A2:G11

// 3rd row (Amit), 2nd column (Name):
=INDEX(A2:G11, 3, 2)

// Result: Amit

// 5th row (Ravi), 5th column (Salary):
=INDEX(A2:G11, 5, 5)

// Result: 53000

// 8th row (Anjali), 3rd column (Dept):
=INDEX(A2:G11, 8, 3)

// Result: IT

Example 2: Single column/row se value nikalna.

// Single column INDEX (Names column):
=INDEX(B2:B11, 4)

// 4th name = Sneha

// Single row INDEX (First employee ki details):
=INDEX(A2:G2, 5)

// 5th column of row 2 = 75000 (Rahul's salary)

// Get entire row (all details of 3rd employee):
=INDEX(A2:G11, 3, 0)

// col_num = 0 returns entire row (needs array formula)

Example 3: INDEX se VLOOKUP jaisa kaam bhi ho sakta hai — but reverse direction!

// VLOOKUP nahi kar sakta right-to-left lookup

// But INDEX kar sakta hai!

// 4th row ka pehla column (EmpID):
=INDEX(A2:G11, 4, 1)

// Result: 104 (Sneha's EmpID)

// Yeh VLOOKUP se possible nahi hai directly!

📊 INDEX Practice Results:

Formula Result Meaning
=INDEX(A2:G11, 1, 2)RahulRow 1, Col 2
=INDEX(A2:G11, 6, 4)MumbaiRow 6, Col 4
=INDEX(E2:E11, 10)7100010th salary
=INDEX(A2:G11, 9, 7)27Suresh's age

⚠️ Common Mistakes:

  • Mistake: Row/column numbers ko wrong count karna → Header row include ya exclude?
    Fix: Range mein jo start hai wahi row 1 hai. Agar A2:G11 use kiya toh row 1 = A2, row 2 = A3...
  • Mistake: Sirf position se value nikalna manually → Position hardcode ho jaati hai.
    Fix: MATCH ke saath combine karo (Topic 5) — dynamic lookup ho jayega.
  • Mistake: Column number bhool jaana single column range mein → =INDEX(B2:B11, 5, 2) error!
    Fix: Single column mein col_num skip karo: =INDEX(B2:B11, 5)

💬 Interview Questions:

Q1: What is the INDEX function and how does it work?
Ans: INDEX returns the value at the intersection of a specified row and column within a range. Syntax: INDEX(array, row_num, [col_num]). Unlike VLOOKUP which searches for values, INDEX directly accesses values by position. Example: INDEX(A2:G11, 3, 2) returns the value at row 3, column 2 of that range. It works with both single-column ranges (row_num only) and 2D ranges (both arguments needed).

Q2: How is INDEX better than VLOOKUP?
Ans: INDEX has several advantages: (1) Can look in any direction — left, right, up, down. (2) Faster on large datasets. (3) Doesn't break when columns are inserted/deleted. (4) More flexible when combined with MATCH. (5) Can return entire rows or columns. VLOOKUP only looks right and breaks if column positions change. However, INDEX alone requires you to know the exact position — that's why it's typically combined with MATCH.

4. MATCH — Find Position of Value

text

🔍 Definition: MATCH searches for a specified value in a range and returns its relative position (row number or column number). Unlike VLOOKUP which returns the value, MATCH returns the POSITION where that value is found. MATCH is the perfect partner for INDEX.

🎯 Samjho Simple Bhasha Mein: MATCH ka kaam simple hai — "yeh value list mein kaunse number pe hai woh batao." Socho tumhare paas 10 employees ki list hai. Tum poochho "Amit kaunse number pe hai?" — MATCH bolega "3rd position pe hai." Yeh position number tab kaam aata hai jab INDEX ke saath combine karte ho.

💡 MATCH Syntax:

=MATCH(lookup_value, lookup_array, [match_type])

lookup_value: Jo value dhundhni hai
lookup_array: Range jismein dhundhna hai
match_type: 0 = Exact, 1 = Ascending, -1 = Descending

Hamesha 0 use karo exact match ke liye!

💻 Real-World Examples:

Example 1: Employee name ki position dhundna.

// Names column: B2:B11

// Employees: Rahul, Priya, Amit, Sneha, Ravi,

// Kavita, Deepak, Anjali, Suresh, Neha

=MATCH("Amit", B2:B11, 0)

// Result: 3 (Amit is at position 3)

=MATCH("Anjali", B2:B11, 0)

// Result: 8

=MATCH("Neha", B2:B11, 0)

// Result: 10 (last position)

=MATCH("Vikas", B2:B11, 0)

// Result: #N/A (not found)

Example 2: Column header ki position nikalna.

// Header row: A1:G1
// Headers: EmpID, Name, Dept, City, Salary,
Join Date, Age

=MATCH("Salary", A1:G1, 0)
// Result: 5 (Salary is 5th column)

=MATCH("Dept", A1:G1, 0)
// Result: 3

=MATCH("Age", A1:G1, 0)
// Result: 7

Example 3: Number search — Salary ki position dhundna.

// Salary column: E2:E11
=MATCH(92000, E2:E11, 0)

// Result: 4 (Sneha's salary at position 4)

=MATCH(MAX(E2:E11), E2:E11, 0)

// Result: 8 (Highest salary — Anjali at position 8)

=MATCH(MIN(E2:E11), E2:E11, 0)

// Result: 6 (Lowest salary — Kavita at position 6)

📊 MATCH Practice Table:

Formula Result
=MATCH(101, A2:A11, 0)1
=MATCH("Sneha", B2:B11, 0)4
=MATCH("Delhi", D2:D11, 0)1 (first Delhi)
=MATCH("City", A1:G1, 0)4

⚠️ Common Mistakes:

  • Mistake: match_type omit karna ya 1 use karna → Approximate match ho jaata hai.
    Fix: Hamesha 0 use karo: =MATCH(value, range, 0)
  • Mistake: MATCH ko alone use karna → Sirf position milti hai, actual value nahi.
    Fix: INDEX ke saath combine karo — INDEX+MATCH = perfect lookup (Topic 5).
  • Mistake: Duplicate values hone par confusion → MATCH sirf pehla match return karta hai.
    Fix: Duplicate handling ke liye COUNTIF ya array formulas use karo.

💬 Interview Questions:

Q1: What is the MATCH function and what does it return?
Ans: MATCH searches for a specified value in a range and returns its RELATIVE POSITION (a number) — not the value itself. Syntax: MATCH(lookup_value, lookup_array, [match_type]). match_type: 0 for exact match (most common), 1 for ascending approximate, -1 for descending approximate. Example: MATCH("Amit", B2:B11, 0) returns 3 if Amit is the 3rd value in that range.

Q2: What is the difference between VLOOKUP and MATCH?
Ans: VLOOKUP returns the VALUE from a specified column after finding the match. MATCH returns the POSITION (row number) where the match is found. VLOOKUP does complete lookup; MATCH does half the job. To get a value using MATCH, combine it with INDEX: INDEX(range, MATCH(...)). MATCH is more flexible and forms the powerful INDEX+MATCH combo.

Q3: Why is match_type 0 recommended?
Ans: match_type 0 forces exact match — returns error (#N/A) if value not found, ensuring data accuracy. match_type 1 (approximate) requires sorted data and can return wrong results silently. match_type -1 is rarely used. For business data lookup, always use 0 to avoid incorrect results. Only use 1 or -1 for specific scenarios like grade calculations or tier-based lookups.

5. INDEX + MATCH Combo — VLOOKUP ka Better Version

text

🔍 Definition: INDEX+MATCH is a combination of INDEX (returns value by position) and MATCH (finds position of value) that works as a superior alternative to VLOOKUP. It can look in any direction (left, right, up, down), doesn't break when columns are moved, and is faster on large datasets.

🎯 Samjho Simple Bhasha Mein: VLOOKUP ki saari limitations ka solution hai INDEX+MATCH! MATCH bolega "yeh value kaunse position pe hai," aur INDEX bolega "us position ki desired column ki value do." Do formulas milke kamaal karte hain. Ek baar seekh gaye toh VLOOKUP bhool jaoge — INDEX+MATCH hi use karoge!

💡 INDEX + MATCH Formula Pattern:

=INDEX(return_column, MATCH(lookup_value, lookup_column, 0))

Breakdown:
1. MATCH finds position of lookup_value
2. INDEX uses that position to return value from return_column
3. Both columns can be anywhere — left or right!

💻 Real-World Examples:

Example 1: Basic INDEX+MATCH — Name se Salary nikalna.

// Data: Names in B2:B11, Salaries in E2:E11

// Formula:
=INDEX(E2:E11, MATCH("Sneha", B2:B11, 0))

// How it works:

// Step 1: MATCH("Sneha", B2:B11, 0) → returns 4

// Step 2: INDEX(E2:E11, 4) → returns 4th salary

// Result: 92000

// Same for other employees:
=INDEX(E2:E11, MATCH("Amit", B2:B11, 0)) 
// 48000
=INDEX(E2:E11, MATCH("Deepak", B2:B11, 0)) 
// 68000

Example 2: Right-to-Left Lookup — Name se EmpID nikalna (VLOOKUP nahi kar sakta).

// EmpID column A hai (LEFT)

// Name column B hai (RIGHT)

// VLOOKUP fail hoga — right se left nahi ja sakta!

// INDEX+MATCH easily kar leta hai:
=INDEX(A2:A11, MATCH("Anjali", B2:B11, 0))

// Result: 108 (Anjali's EmpID)

// Name se City:
=INDEX(D2:D11, MATCH("Rahul", B2:B11, 0))

// Result: Delhi

Example 3: Two-way lookup — Employee aur Column dono dynamic.

// Cell I1 mein Name: "Priya"
// Cell J1 mein Column: "Salary"

// Two-way INDEX+MATCH:
=INDEX(A2:G11, MATCH(I1, B2:B11, 0), MATCH(J1, A1:G1, 0))

// How it works:
// MATCH(I1, B2:B11, 0) → Priya's row = 2
// MATCH(J1, A1:G1, 0) → Salary's col = 5
// INDEX(A2:G11, 2, 5) → Row 2, Col 5 = 85000

// I1 ya J1 change karo — result automatically
update!
// This is DYNAMIC lookup — most powerful use case!

Example 4: IFERROR ke saath — clean output.

// Handle #N/A error professionally:
=IFERROR(INDEX(E2:E11, MATCH("Vikas", B2:B11, 0)), "Employee Not Found")

// Agar "Vikas" nahi mila:

// Result: "Employee Not Found"

// Instead of ugly #N/A error

📊 VLOOKUP vs INDEX+MATCH — Comparison:

Feature VLOOKUP INDEX+MATCH
Direction Only Left to Right Any direction ✅
Column Insert/Delete Breaks ❌ Works ✅
Speed Slower Faster ✅
Complexity Easy ✅ Slightly complex
Flexibility Limited Highly flexible ✅

⚠️ Common Mistakes:

  • Mistake: INDEX aur MATCH ke ranges different sizes ke dena → Wrong results.
    Fix: Return column aur lookup column same rows tak hone chahiye. E2:E11 aur B2:B11 — dono 10 rows.
  • Mistake: MATCH mein 0 bhool jaana → Approximate match kar dega.
    Fix: Hamesha MATCH(value, range, 0) — 0 zaroori hai!
  • Mistake: Formula copy karne par ranges shift ho jaana → Wrong data.
    Fix: Absolute references use karo: $B$2:$B$11, $E$2:$E$11

💬 Interview Questions:

Q1: Why is INDEX+MATCH considered better than VLOOKUP?
Ans: INDEX+MATCH has several advantages: (1) Can lookup in any direction — left, right, up, down. (2) Doesn't break when columns are inserted or deleted. (3) Faster on large datasets — INDEX only accesses what's needed. (4) More flexible for complex lookups. (5) Can do two-way lookups (both row and column dynamic). (6) Works with variable table sizes. VLOOKUP is simpler but less powerful — INDEX+MATCH is preferred by advanced Excel users.

Q2: Write an INDEX+MATCH formula to find Employee ID based on Name.
Ans: =INDEX(A2:A11, MATCH("Sneha", B2:B11, 0)). This works because: MATCH finds "Sneha" in Name column (B2:B11) and returns her position (4). INDEX then returns the value from EmpID column (A2:A11) at position 4, which is 104. VLOOKUP cannot do this because EmpID column is to the LEFT of Name column.

Q3: How do you create a two-way lookup with INDEX+MATCH?
Ans: Use MATCH twice — once for row and once for column: =INDEX(table_range, MATCH(row_value, row_range, 0), MATCH(col_value, col_range, 0)). Example: =INDEX(A2:G11, MATCH("Priya", B2:B11, 0), MATCH("Salary", A1:G1, 0)). First MATCH finds Priya's row position, second MATCH finds Salary column position, INDEX returns the intersection value. Perfect for dynamic dashboards!

6. XLOOKUP — Modern Lookup Function

text

🔍 Definition: XLOOKUP is the modern replacement for VLOOKUP, HLOOKUP, and INDEX+MATCH — introduced in Excel 365 and Excel 2021. It can search in any direction (left, right, up, down), returns both single values or entire ranges, and has built-in error handling. Simplest and most powerful lookup function.

🎯 Samjho Simple Bhasha Mein: XLOOKUP matlab "sab kuch ek hi function mein!" VLOOKUP ki left-to-right limitation nahi, HLOOKUP alag se nahi chahiye, INDEX+MATCH ka complex combination nahi chahiye — bas XLOOKUP! Aur IFERROR bhi built-in hai — error case handle karne ke liye separate function nahi lagana padta. Excel 365/2021 use karte ho toh XLOOKUP hi use karo!

💡 XLOOKUP Syntax:

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

lookup_value: Jo dhundhna hai
lookup_array: Kaunsi column mein dhundhna hai
return_array: Kaunsi column se value chahiye
if_not_found: Error case mein kya dikhana hai
match_mode: 0 = exact (default), -1 = smaller, 1 = larger, 2 = wildcard
search_mode: 1 = first to last (default), -1 = last to first

💻 Real-World Examples:

Example 1: Basic XLOOKUP — Name se Salary nikalna.

// Simple XLOOKUP — Name se Salary:
=XLOOKUP("Sneha", B2:B11, E2:E11)

// Result: 92000

// How it works:

// "Sneha" → Search karna

// B2:B11 → Names column mein dhundho

// E2:E11 → Salary column se value do

// Multiple lookups:
=XLOOKUP("Amit", B2:B11, D2:D11) 
// City: Delhi
=XLOOKUP("Priya", B2:B11, C2:C11) 
// Dept: HR
=XLOOKUP(108, A2:A11, B2:B11) 
// Name: Anjali

Example 2: XLOOKUP with Error Handling — Built-in IFERROR.

// If value not found, show custom message:
=XLOOKUP("Vikas", B2:B11, E2:E11, "Employee Not Found")
// Result: Employee Not Found (no #N/A error!)

// Compare with old approach (VLOOKUP):
=IFERROR(VLOOKUP("Vikas", A2:G11, 5, FALSE), "Not Found")
// Same result but XLOOKUP mein IFERROR built-in hai!

Example 3: Right-to-Left Lookup — Name se EmpID (VLOOKUP nahi kar sakta).

// Name (column B) se EmpID (column A) — RIGHT to LEFT
=XLOOKUP("Neha", B2:B11, A2:A11)

// Result: 110

// City se Name:
=XLOOKUP("Chennai", D2:D11, B2:B11)

// Result: Ravi (first match)

// Age se EmpID:
=XLOOKUP(38, G2:G11, A2:A11)

// Result: 108 (Anjali's EmpID)

Example 4: Return Multiple Columns at Once.

// Ek hi formula se multiple columns return (Excel 365):
=XLOOKUP("Rahul", B2:B11, C2:G11)
// Result: IT, Delhi, 75000, 15-Mar-21, 28
// Puri row ek saath spill ho jaati hai!

// Search from last (reverse direction):
=XLOOKUP("Delhi", D2:D11, B2:B11, "", 0, -1)
// Result: Deepak (last Delhi employee, not first)
// -1 = search from bottom to top

📊 XLOOKUP vs Old Functions:

Task Old Way XLOOKUP Way
Simple lookup =VLOOKUP(x, A:G, 5, 0) =XLOOKUP(x, A:A, E:E)
Left lookup =INDEX(A:A, MATCH(x, B:B, 0)) =XLOOKUP(x, B:B, A:A)
With error handling =IFERROR(VLOOKUP(...), "NA") =XLOOKUP(x, y, z, "NA")
Horizontal lookup HLOOKUP separate XLOOKUP handles both

⚡ Compatibility Warning: XLOOKUP only works in Excel 365, Excel 2021, and Excel for Web. Older versions (Excel 2019, 2016, 2013) don't have XLOOKUP — use VLOOKUP or INDEX+MATCH in those. Check your Excel version before using in shared files.

⚠️ Common Mistakes:

  • Mistake: Old Excel version mein XLOOKUP use karna → #NAME? error!
    Fix: Excel version check karo. Older version mein VLOOKUP ya INDEX+MATCH use karo.
  • Mistake: lookup_array aur return_array different sizes ke dena.
    Fix: Dono arrays same number of rows/columns mein hone chahiye.
  • Mistake: if_not_found argument skip karna → Errors ugly dikhte hain.
    Fix: Hamesha 4th argument mein friendly message do: "Not Found"

💬 Interview Questions:

Q1: What is XLOOKUP and why is it better than VLOOKUP?
Ans: XLOOKUP is Microsoft's modern lookup function introduced in Excel 365/2021 that replaces VLOOKUP, HLOOKUP, and INDEX+MATCH. Advantages: (1) Searches in any direction — left, right, up, down. (2) Built-in error handling with 4th argument. (3) Supports both vertical and horizontal lookups. (4) Can return multiple columns/rows. (5) Simpler syntax. (6) Faster on large datasets. Only limitation: works only in Excel 365 and 2021.

Q2: What are the 6 arguments of XLOOKUP?
Ans: (1) lookup_value — what to search, (2) lookup_array — where to search, (3) return_array — where to return from, (4) if_not_found — custom message for missing values, (5) match_mode — 0 exact, -1 next smaller, 1 next larger, 2 wildcard, (6) search_mode — 1 first-to-last, -1 last-to-first, 2 binary ascending, -2 binary descending. First 3 are required, rest are optional.

Q3: Can XLOOKUP return multiple values?
Ans: Yes, XLOOKUP can return an entire range if the return_array has multiple columns. Example: =XLOOKUP("Rahul", B2:B11, C2:G11) returns Dept, City, Salary, Join Date, and Age all in one formula — the values spill into adjacent cells (dynamic array feature). This is impossible with traditional VLOOKUP which returns only one value.

7. CHOOSE — Select from List

text

🔍 Definition: CHOOSE returns a value from a list based on an index number. It works like a mini switch/case — give an index (1, 2, 3...) and get the corresponding value from the provided list. Useful for creating simple selection menus and dynamic references.

🎯 Samjho Simple Bhasha Mein: CHOOSE ek restaurant menu ki tarah kaam karta hai. Tum item number bolo — CHOOSE tumhe woh item de dega. "Item 3 do" — CHOOSE list se 3rd item return karega. Yeh nested IF ke chakkar se bachne mein help karta hai. Grades, quarters, months, days — sab CHOOSE se easily handle ho jaate hain.

💡 CHOOSE Syntax:

=CHOOSE(index_num, value1, [value2], [value3], ...)

index_num: 1 to 254 tak ka number
value1, value2...: List of values to choose from

Maximum 254 values! index_num decide karta hai kaunsa return hoga.

💻 Real-World Examples:

Example 1: Simple CHOOSE — Grade system.

// Grade based on index:
=CHOOSE(1, "A", "B", "C", "D", "F")

// Result: A

=CHOOSE(3, "A", "B", "C", "D", "F")

// Result: C

=CHOOSE(5, "A", "B", "C", "D", "F")

// Result: F

// Day of week (1=Sunday, 2=Monday...):
=CHOOSE(WEEKDAY(TODAY()), "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")

// Result: Today's day name

Example 2: Quarterly bucketing based on month.

// Month number se Quarter nikalna:

// Cell A1 mein hire date hai

=CHOOSE(MONTH(A1), "Q1","Q1","Q1", "Q2","Q2","Q2", "Q3","Q3","Q3", "Q4","Q4","Q4")

// Explanation:

// MONTH(A1) → 1 to 12

// Position 1,2,3 = Q1 (Jan, Feb, Mar)

// Position 4,5,6 = Q2 (Apr, May, Jun)

// Position 7,8,9 = Q3

// Position 10,11,12 = Q4

// For Rahul (15-Mar-21): MONTH = 3 → Q1

Example 3: Salary Grade based on ranking.

// Cell G2 mein salary hai

// Grade calculate karo based on ranges

=CHOOSE(
IF(G2

// Salary 45000 → Index 1 → Junior

// Salary 65000 → Index 2 → Mid Level

// Salary 80000 → Index 3 → Senior

// Salary 95000 → Index 4 → Lead

📊 CHOOSE Practice Results:

Formula Result
=CHOOSE(2, "Red", "Green", "Blue")Green
=CHOOSE(4, 10, 20, 30, 40, 50)40
=CHOOSE(1, "Excel", "Word", "PPT")Excel
=CHOOSE(6, "A", "B", "C")#VALUE! (out of range)

⚠️ Common Mistakes:

  • Mistake: index_num values list ke bahar dena → #VALUE! error.
    Fix: Ensure index_num is between 1 and total values count.
  • Mistake: Zero ya negative index use karna → Error!
    Fix: CHOOSE only accepts 1 to 254 as index.
  • Mistake: CHOOSE bahut long list ke liye use karna → Formula unmanageable ho jaata hai.
    Fix: Bahut items hain toh VLOOKUP ya XLOOKUP with lookup table use karo.

💬 Interview Questions:

Q1: What is CHOOSE function and when do you use it?
Ans: CHOOSE returns a value from a list based on an index number. Syntax: =CHOOSE(index_num, value1, value2, ...). Used for: converting numeric codes to text (1→Jan, 2→Feb), creating simple selection menus, quarterly bucketing from month numbers, day-of-week names from WEEKDAY(), and avoiding complex nested IFs when you have a small list of options (up to 254 items).

Q2: What is the difference between CHOOSE and IF?
Ans: CHOOSE selects a value based on a NUMERIC index (1, 2, 3...) — clean and simple for known sequential options. IF selects based on a CONDITION (TRUE/FALSE). CHOOSE is better when you have discrete numbered options like quarters, grades, day names. IF is better for conditional logic like "if salary > 50000 then...". For complex multi-condition scenarios, IFS or SWITCH are better than nested IFs.

8. INDIRECT — Dynamic Cell Reference

text

🔍 Definition: INDIRECT converts a text string into an actual cell reference. It creates dynamic references that can change based on other cells' values. Very powerful for building dynamic dashboards where sheet names, cell addresses, or ranges need to change based on user input.

🎯 Samjho Simple Bhasha Mein: INDIRECT ek magical function hai jo text ko real reference banata hai. Socho tumne cell A1 mein "B5" text likha hai. Ab =INDIRECT(A1) automatically B5 cell ki value dega — matlab text "B5" ko real reference bana diya! Yeh dashboards banane mein bahut kaam aata hai — user dropdown se sheet select kare aur formula automatically us sheet ka data pull kare.

💡 INDIRECT Syntax:

=INDIRECT(ref_text, [a1])

ref_text: Text string jo reference banega
a1: TRUE (default) = A1 style, FALSE = R1C1 style

INDIRECT text ko real reference banata hai — magic!

💻 Real-World Examples:

Example 1: Basic INDIRECT usage.

// Cell A1 mein text "B5" hai
// Cell B5 mein value "Hello" hai

=INDIRECT("B5")
// Result: Hello (direct reference)

=INDIRECT(A1)
// Result: Hello
// A1 mein "B5" text hai, INDIRECT usse B5 reference banata hai

// Build reference dynamically:
=INDIRECT("A" & 5)
// Result: Value from A5
// "A" + 5 = "A5" text, INDIRECT usse A5 reference banata hai

Example 2: Dynamic sheet reference — dropdown se sheet select karo.

// Cell H1 mein dropdown hai: "Sheet1", "Sheet2", "Sheet3"
// Har sheet mein Employee data hai

// H1 mein jo sheet select kiya, us sheet ki A2 value nikalo:
=INDIRECT(H1 & "!A2")

// Agar H1 mein "Sheet2" hai:
// INDIRECT builds: "Sheet2!A2"
// Result: Sheet2 ki A2 ki value

// H1 change karo → Formula automatically different sheet se data pull!

Example 3: Dynamic SUM range — user-defined range.

// User apna range decide kare:

// Cell J1 mein: "E2" (start row)

// Cell J2 mein: "E11" (end row)

// Dynamic SUM:
=SUM(INDIRECT(J1 & ":" & J2))

// INDIRECT builds: "E2:E11"

// SUM calculates: 683000

// User J2 mein "E5" kar de:

// Range ban jaayega "E2:E5"

// New sum automatically calculate!

Example 4: INDIRECT with Named Ranges.

// Suppose named ranges exist:

// "IT_Salaries" → E2:E5

// "HR_Salaries" → E6:E8

// "Sales_Salaries" → E9:E11

// Cell K1 mein department name: "IT"

=SUM(INDIRECT(K1 & "_Salaries"))

// Builds: "IT_Salaries"

// SUM(IT_Salaries) = Total IT salary

// K1 change to "HR":

// Automatically HR salary total calculate!

⚡ Warning: INDIRECT is a volatile function — it recalculates every time any cell in the workbook changes. Overuse can slow down large workbooks. Use only when dynamic references are truly needed.

⚠️ Common Mistakes:

  • Mistake: INDIRECT mein text ke quotes miss karna → =INDIRECT(B5) vs =INDIRECT("B5") — different meanings!
    Fix: Direct text mein quotes zaroori. Cell reference mein nahi.
  • Mistake: Sheet name mein space hai but ' (single quote) nahi lagaya → Error!
    Fix: Sheet names with spaces: =INDIRECT("'My Sheet'!A1")
  • Mistake: Overuse of INDIRECT → Workbook slow ho jaata hai.
    Fix: Only use for truly dynamic scenarios. Simple lookups ke liye XLOOKUP ya INDEX use karo.

💬 Interview Questions:

Q1: What is INDIRECT function and when is it useful?
Ans: INDIRECT converts a text string into a real cell reference. Syntax: =INDIRECT(ref_text). Useful for: (1) Dynamic sheet references based on dropdown selection, (2) Building cell references from parts (like "A" & row_num), (3) Referencing named ranges dynamically, (4) Creating flexible dashboards where users can change data sources. However, INDIRECT is volatile and can slow down large workbooks — use judiciously.

Q2: What does "volatile function" mean in Excel?
Ans: Volatile functions recalculate every time ANY cell in the workbook changes — not just when their input changes. Examples: INDIRECT, OFFSET, NOW, TODAY, RAND, RANDBETWEEN. This can significantly slow down large workbooks with thousands of formulas. Non-volatile functions only recalculate when their direct dependencies change, making them much faster.

9. OFFSET — Reference from Starting Point

text

🔍 Definition: OFFSET returns a cell or range that is offset from a starting reference by a specified number of rows and columns. It can also return a range of specified height and width. Used for creating dynamic ranges and rolling calculations.

🎯 Samjho Simple Bhasha Mein: OFFSET GPS coordinates ki tarah kaam karta hai. Tum starting point do — phir bolo "2 rows down, 3 columns right jao" — OFFSET wahan pahunch jayega. Aur bolo "ab wahan se 5 rows aur 2 columns ka range lelo" — OFFSET woh range return karega. Rolling averages, dynamic ranges, moving data windows — sab OFFSET se hote hain.

💡 OFFSET Syntax:

=OFFSET(reference, rows, cols, [height], [width])

reference: Starting cell/range
rows: Rows to move (positive = down, negative = up)
cols: Columns to move (positive = right, negative = left)
height: Number of rows in returned range (optional)
width: Number of columns in returned range (optional)

💻 Real-World Examples:

Example 1: Basic OFFSET — Move from starting cell.

// Starting
from A1, move 2 rows down, 3 cols right:
=
OFFSET(A1, 2, 3)
// Result: D3 ki value

//
From A1, move 5 down, 4 right:
=
OFFSET(A1, 5, 4)
// Result: E6 ki value

// Employee data example:
//
From A1 header, 4 rows down, 4 cols right = E5
=
OFFSET(A1, 4, 4)
// Result: 53000 (Ravi's salary)

Example 2: Dynamic range with height/width.

// Sum last 5 salaries:
=SUM(OFFSET(E11, 0, 0, -5, 1))
// Starting
from E11, height = -5 means go UP 5 rows
// Result: Sum of E7:E11 (last 5 salaries)

// Sum first 3 salaries:
=SUM(OFFSET(E2, 0, 0, 3, 1))
// Starting
from E2, 3 rows down = E2:E4
// Result: 75000 + 85000 + 48000 = 208000

// Get entire employee row (all 7 columns):
=
OFFSET(A2, 3, 0, 1, 7)
//
From A2, 3 rows down, 1 row high, 7 cols wide
// Result: Row 5 (Ravi's complete data)

Example 3: Rolling average of last N values.

// Last 3 salaries ka average:
=AVERAGE(OFFSET(E11, 0, 0, -3, 1))
//
From E11 go UP 3 rows = E9:E11
// Average of Suresh, Neha, Anjali salaries

// Dynamic — user chooses "N":
// Cell K1 mein N = 5
=AVERAGE(OFFSET(E11, 0, 0, -K1, 1))
// Last 5 salaries ka average
// K1 change karo — automatically
update!

Example 4: OFFSET + COUNTA — Auto-expanding dynamic range.

// Automatically detect data size:
// COUNTA counts non-empty cells

=SUM(OFFSET(E1, 1, 0, COUNTA(E:E)-1, 1))

// Explanation:
//
OFFSET(E1, 1, 0, ...) → Start
from E2
// COUNTA(E:E)-1 → Count E column
values, minus header
// height → Dynamic based
on data

// Add new employee → SUM automatically includes it!
// This is perfect for expanding data ranges

⚡ Warning: OFFSET is also a volatile function — same performance concerns as INDIRECT. For large datasets, prefer INDEX or structured Excel Tables (Ctrl+T) for dynamic ranges.

⚠️ Common Mistakes:

  • Mistake: Negative height/width samajh na aana → Direction confusion.
    Fix: Positive = right/down. Negative = left/up.
  • Mistake: OFFSET result direct cell mein use karna without SUM/AVERAGE → Multi-cell result mein error.
    Fix: Range result ke liye SUM, AVERAGE, COUNT jaisa function use karo.
  • Mistake: Overuse OFFSET in large workbooks → Slow performance.
    Fix: Excel Tables (Ctrl+T) use karo — automatically dynamic ranges banate hain.

💬 Interview Questions:

Q1: What is OFFSET function and what are its arguments?
Ans: OFFSET returns a reference offset from a starting point. Syntax: =OFFSET(reference, rows, cols, [height], [width]). reference = starting cell, rows = vertical movement (+ down, - up), cols = horizontal movement (+ right, - left), height/width = size of returned range. Example: OFFSET(A1, 2, 3) returns D3. OFFSET(A1, 0, 0, 5, 3) returns range A1:C5.

Q2: How do you create a dynamic range with OFFSET?
Ans: Combine OFFSET with COUNTA: =SUM(OFFSET(A1, 1, 0, COUNTA(A:A)-1, 1)). This creates a range that automatically expands as new data is added. COUNTA counts non-empty cells in column A, subtracting 1 for the header. This dynamic sum will include any new rows added below. Alternative: use Excel Tables (Ctrl+T) which handle dynamic ranges natively.

Q3: What is the difference between INDIRECT and OFFSET?
Ans: INDIRECT converts a text string into a reference — useful when the reference itself needs to change based on user input (like different sheet names). OFFSET moves from a starting reference by row/column counts — useful for shifting positions or creating dynamic ranges. Both are volatile functions. INDIRECT for text-based references. OFFSET for position-based references.

10. ROW, COLUMN, ROWS, COLUMNS — Position Functions

text

🔍 Definition: These functions return position information about cells or ranges. ROW() returns the row number of a cell. COLUMN() returns the column number. ROWS() counts rows in a range. COLUMNS() counts columns in a range. Useful for creating serial numbers, dynamic formulas, and range calculations.

🎯 Samjho Simple Bhasha Mein: Yeh functions position aur size batate hain. ROW() bolega "tum kaunse row number pe ho." COLUMN() bolega "kaunse column pe." ROWS() bolega "range mein kitne rows hain." COLUMNS() bolega "range mein kitne columns hain." Serial numbers banane, alternate row shading, aur formula automation ke liye bahut kaam aate hain.

💡 Syntax for All Four:

=ROW([reference]) → Row number of reference
=COLUMN([reference]) → Column number of reference
=ROWS(range) → Count of rows in range
=COLUMNS(range) → Count of columns in range

reference optional — omit karo toh current cell ka value milega

💻 Real-World Examples:

Example 1: Basic ROW & COLUMN usage.

// Current cell ka row/column number:
=ROW()

// Cell A5 mein hai toh → 5

=COLUMN()

// Cell C1 mein hai toh → 3 (C = 3rd column)

// Specific cell ka row/column:
=ROW(D10) 
// Result: 10
=COLUMN(D10) 
// Result: 4 (D = 4th column)
=ROW(A1) 
// Result: 1
=COLUMN(Z1) 
// Result: 26

Example 2: ROWS & COLUMNS — Range size count.

// Count rows in a range:
=ROWS(A2:A11) 
// Result: 10
=ROWS(A1:G20) 
// Result: 20

// Count columns in a range:
=COLUMNS(A1:G1) 
// Result: 7
=COLUMNS(A1:E10) 
// Result: 5

// Count total cells:
=ROWS(A1:E10) * COLUMNS(A1:E10)

// Result: 10 × 5 = 50 total cells

Example 3: Auto-generated Serial Numbers using ROW.

// Cell H2 mein Sr. No. banao:
=ROW()-1

// H2 mein hai row 2, minus 1 = 1

// H3 mein hai row 3, minus 1 = 2

// H4 mein 3, H5 mein 4...

// Drag down — automatic serial numbers 1, 2, 3, 4...!

// Row delete karo — numbers automatically adjust!

// Advantage over manual typing:

// Delete row 3 → Manual 1,2,3,4 becomes 1,2,4

// Formula ROW()-1 → Always 1,2,3,4 sequentially!

Example 4: Alternate row shading using ROW & MOD.

// Conditional Formatting formula:

// Home → Conditional Formatting → New Rule → Use formula

=MOD(ROW(), 2) = 0

// TRUE for even rows (2, 4, 6...)

// Apply light blue background

// Result: Zebra striping effect!

// Alternate columns:
=MOD(COLUMN(), 2) = 0

// Even columns get highlighted

Example 5: Dynamic formulas with ROW & COLUMN.

// Get value
from row 5 of any column using INDIRECT + ROW:
=INDIRECT("E" & ROW())
// If in row 3, returns E3 value
// If in row 7, returns E7 value

// Combined with INDEX for dynamic lookup:
=INDEX(A:A, ROW())
// Returns current row's column A value

// Count how many employees (dynamic):
=ROWS(A2:A11)
// Result: 10 employees

📊 Practice Results:

Formula Result
=ROW(B15)15
=COLUMN(E5)5
=ROWS(A1:A100)100
=COLUMNS(A1:Z1)26

⚠️ Common Mistakes:

  • Mistake: ROW() aur ROWS() confuse karna → Different functions!
    Fix: ROW() = single cell ka row number. ROWS() = range mein rows count.
  • Mistake: Serial numbers manually type karna → Row delete/insert karne par sequence toot jaata hai.
    Fix: =ROW()-1 use karo — always sequential rahega.
  • Mistake: ROW/COLUMN mein reference miss karke current cell assume karna.
    Fix: Specific cell ka info chahiye toh reference do: =ROW(D10)

💬 Interview Questions:

Q1: What is the difference between ROW() and ROWS()?
Ans: ROW() returns the row NUMBER of a single cell — =ROW(B5) returns 5. ROWS() returns the COUNT of rows in a range — =ROWS(A1:A10) returns 10. Similarly COLUMN() vs COLUMNS(). Use ROW/COLUMN for position; use ROWS/COLUMNS for size. Common use of ROW(): serial numbers with =ROW()-1. Common use of ROWS(): dynamic range calculations.

Q2: How do you create auto-updating serial numbers?
Ans: Use =ROW()-1 in first data cell (say H2), then drag down. If data starts from row 2, H2 becomes 1, H3 becomes 2, and so on. Advantage: when you delete a row, remaining serial numbers automatically re-sequence — manual numbers would leave gaps. Alternative: =ROW(A1) which returns 1, or use Excel Tables which auto-number rows.

Q3: How can you use ROW to create alternate row shading?
Ans: Use Conditional Formatting with formula =MOD(ROW(), 2)=0 for even rows or =MOD(ROW(), 2)=1 for odd rows. MOD returns the remainder — dividing row number by 2. Even rows have remainder 0, odd rows have 1. Apply a fill color when the condition is TRUE. Creates professional zebra-striped tables. Modern alternative: convert range to Excel Table (Ctrl+T) which has built-in banded rows.

Part 2 Complete — All 10 Lookup Functions Reference

Function Purpose Key Syntax
VLOOKUP Vertical lookup (left to right) =VLOOKUP(val, range, col, FALSE)
HLOOKUP Horizontal lookup (top to bottom) =HLOOKUP(val, range, row, FALSE)
INDEX Return value by position =INDEX(range, row, col)
MATCH Find position of value =MATCH(val, range, 0)
INDEX+MATCH Flexible lookup any direction =INDEX(ret, MATCH(val, look, 0))
XLOOKUP Modern all-in-one lookup =XLOOKUP(val, look, ret, "NA")
CHOOSE Select from list by index =CHOOSE(idx, val1, val2, ...)
INDIRECT Text to reference conversion =INDIRECT("B5")
OFFSET Reference from starting point =OFFSET(ref, rows, cols, h, w)
ROW/COLUMN Position info =ROW() =COLUMN()

🎯 Which Lookup Should You Use?

Simple vertical lookup? → VLOOKUP (older Excel) or XLOOKUP (Excel 365)

Horizontal data? → HLOOKUP or XLOOKUP

Need to lookup left of key column? → INDEX+MATCH or XLOOKUP

Have Excel 365/2021? → Always use XLOOKUP — simplest and most powerful

Older Excel version? → INDEX+MATCH is best (more flexible than VLOOKUP)

Building dynamic dashboards? → INDIRECT + OFFSET for dynamic references

Small selection list? → CHOOSE (for 5-10 options)

Next: Data Insights Excel Masterclass — Part 3

Part 3 mein hum cover karenge: Logical & Conditional Functions — IF, Nested IF, IFS, AND, OR, NOT, IFERROR, SWITCH, COUNTIF, SUMIF, AVERAGEIF, MAXIFS, MINIFS — Excel ke decision making formulas Data Insights par.

Happy Learning & Keep Excelling! 🚀

👤
Jatin Kumar
Data Analyst & Educator

Python, SQL, Power BI aur Excel mein practical tutorials likhta hoon — taaki data analytics seekhna aasan ho. Portfolio: jatinanalytics.co.in

Portfolio LinkedIn GitHub Kaggle All Articles
Share:

💬 Comments (0)

Spam/links allowed nahi hain — respectful comments welcome!

Loading comments...

Was this article helpful?