Introduction
Excel becomes much more powerful when two or more functions are combined in a single formula. A nested formula means using one function inside another function. In this chapter, you will practice combinations such as IF with AND, IFERROR with lookup functions, INDEX with MATCH, ROUND with calculations, TEXT with dates, and other practical combinations. These questions are designed to help you check your Excel skills using real-world-style data. Nested and Combined Excel Functions Practice questions with solutions to help you understand the concepts.
Question 1: Calculate Final Salary Using IF and ROUND
Problem Statement
Calculate an employee’s final salary after adding a performance bonus.
If the employee’s performance rating is "Excellent", give a 15% bonus. Otherwise, give a 5% bonus. Round the final salary to the nearest whole number.
Excel Data
| Employee | Salary | Rating | Final Salary |
|---|---|---|---|
| Rahul | 45000 | Excellent | |
| Priya | 42000 | Good | |
| Amit | 38000 | Excellent | |
| Neha | 50000 | Average | |
| Arjun | 48000 | Excellent |
Excel Solution
In D2, enter:
=ROUND(B2*(1+IF(C2="Excellent",15%,5%)),0)
Copy the formula down.
Expected Output
| Employee | Salary | Rating | Final Salary |
|---|---|---|---|
| Rahul | 45000 | Excellent | 51750 |
| Priya | 42000 | Good | 44100 |
| Amit | 38000 | Excellent | 43700 |
| Neha | 50000 | Average | 52500 |
| Arjun | 48000 | Excellent | 55200 |
Concepts Covered
IFROUND- Percentage calculation
- Nested functions
Question 2: Calculate a Student’s Result Using IF, AND and AVERAGE
Problem Statement
A student passes only when:
- Maths marks are at least 40.
- Science marks are at least 40.
- English marks are at least 40.
- Overall average is at least 50.
Display "Pass" or "Fail".
Excel Data
| Student | Maths | Science | English | Result |
|---|---|---|---|---|
| Rahul | 72 | 68 | 75 | |
| Priya | 55 | 48 | 52 | |
| Amit | 35 | 72 | 68 | |
| Neha | 45 | 42 | 38 | |
| Arjun | 82 | 78 | 85 |
Excel Solution
In E2, enter:
=IF(AND(B2>=40,C2>=40,D2>=40,AVERAGE(B2:D2)>=50),"Pass","Fail")
Copy the formula down.
Expected Output
| Student | Maths | Science | English | Result |
|---|---|---|---|---|
| Rahul | 72 | 68 | 75 | Pass |
| Priya | 55 | 48 | 52 | Pass |
| Amit | 35 | 72 | 68 | Fail |
| Neha | 45 | 42 | 38 | Fail |
| Arjun | 82 | 78 | 85 | Pass |
Concepts Covered
IFANDAVERAGE- Multiple conditions
Question 3: Calculate Discount Using IF and AND
Problem Statement
A store provides discounts based on purchase amount and customer type.
Rules:
- Premium customers spending ₹50,000 or more get 15%.
- Premium customers spending less than ₹50,000 get 10%.
- Regular customers spending ₹50,000 or more get 8%.
- All other customers get 5%.
Excel Data
| Customer | Type | Purchase Amount | Discount |
|---|---|---|---|
| Rahul | Premium | 65000 | |
| Priya | Regular | 70000 | |
| Amit | Premium | 42000 | |
| Neha | Regular | 45000 | |
| Arjun | Premium | 85000 |
Excel Solution
In D2, enter:
=IF(AND(B2="Premium",C2>=50000),15%,IF(B2="Premium",10%,IF(C2>=50000,8%,5%)))
Copy down.
Expected Output
| Customer | Type | Purchase Amount | Discount |
|---|---|---|---|
| Rahul | Premium | 65000 | 15% |
| Priya | Regular | 70000 | 8% |
| Amit | Premium | 42000 | 10% |
| Neha | Regular | 45000 | 5% |
| Arjun | Premium | 85000 | 15% |
Question 4: Use IFERROR with INDEX-MATCH
Problem Statement
Find the department of each employee using Employee ID. If the Employee ID does not exist, display "Not Found".
Excel Data
| Employee ID | Employee | Department |
|---|---|---|
| E101 | Rahul | IT |
| E102 | Priya | HR |
| E103 | Amit | Sales |
| E104 | Neha | Finance |
| E105 | Arjun | IT |
Search Data
| Employee ID | Department |
|---|---|
| E103 | |
| E108 | |
| E101 | |
| E110 | |
| E105 |
Excel Solution
In B9, enter:
=IFERROR(INDEX($C$2:$C$6,MATCH(A9,$A$2:$A$6,0)),"Not Found")
Copy down.
Expected Output
| Employee ID | Department |
|---|---|
| E103 | Sales |
| E108 | Not Found |
| E101 | IT |
| E110 | Not Found |
| E105 | IT |
Concepts Covered
IFERRORINDEXMATCH- Nested/combined functions
Question 5: Calculate Net Salary Using IF, SUM and ROUND
Problem Statement
Calculate an employee’s net salary.
Net Salary:
Basic Salary + Allowance − Deduction
If the employee’s attendance is below 90%, reduce the allowance by 20%.
Round the final result to the nearest whole number.
Excel Data
| Employee | Basic Salary | Allowance | Deduction | Attendance | Net Salary |
|---|---|---|---|---|---|
| Rahul | 40000 | 8000 | 3000 | 95% | |
| Priya | 42000 | 7000 | 2500 | 88% | |
| Amit | 38000 | 6000 | 2000 | 92% | |
| Neha | 50000 | 9000 | 4000 | 85% | |
| Arjun | 45000 | 7500 | 3000 | 96% |
Excel Solution
In F2, enter:
=ROUND(B2+IF(E2<90%,C2*80%,C2)-D2,0)
Copy down.
Expected Output
| Employee | Basic Salary | Allowance | Deduction | Attendance | Net Salary |
|---|---|---|---|---|---|
| Rahul | 40000 | 8000 | 3000 | 95% | 45000 |
| Priya | 42000 | 7000 | 2500 | 88% | 45100 |
| Amit | 38000 | 6000 | 2000 | 92% | 42000 |
| Neha | 50000 | 9000 | 4000 | 85% | 53200 |
| Arjun | 45000 | 7500 | 3000 | 96% | 49500 |
Question 6: Find Product Price and Calculate Total Using XLOOKUP
Problem Statement
Use XLOOKUP to find the product price and then calculate the total amount based on quantity.
If the product does not exist, display "Product Not Found".
Product Data
| Product ID | Product | Price |
|---|---|---|
| P101 | Keyboard | 850 |
| P102 | Mouse | 550 |
| P103 | Monitor | 12500 |
| P104 | Webcam | 2200 |
| P105 | Headset | 1800 |
Order Data
| Product ID | Quantity | Price | Total |
|---|---|---|---|
| P103 | 2 | ||
| P101 | 5 | ||
| P105 | 3 | ||
| P110 | 2 | ||
| P102 | 4 |
Excel Solution
In C9, enter:
=IFERROR(XLOOKUP(A9,$A$2:$A$6,$C$2:$C$6),"Not Found")
In D9, enter:
=IF(ISNUMBER(C9),C9*B9,"Not Available")
Copy both formulas down.
Expected Output
| Product ID | Quantity | Price | Total |
|---|---|---|---|
| P103 | 2 | 12500 | 25000 |
| P101 | 5 | 850 | 4250 |
| P105 | 3 | 1800 | 5400 |
| P110 | 2 | Not Found | Not Available |
| P102 | 4 | 550 | 2200 |
Concepts Covered
XLOOKUPIFERRORIFISNUMBER- Multiplication
- Lookup + calculation
Question 7: Create an Employee Performance Category
Problem Statement
Classify employees based on their sales and customer rating.
Rules:
- Sales ≥ ₹100,000 and rating ≥ 4.5 →
"Excellent" - Sales ≥ ₹75,000 and rating ≥ 4.0 →
"Good" - Sales ≥ ₹50,000 →
"Average" - Otherwise →
"Needs Improvement"
Excel Data
| Employee | Sales | Rating | Performance |
|---|---|---|---|
| Rahul | 120000 | 4.7 | |
| Priya | 85000 | 4.2 | |
| Amit | 65000 | 3.8 | |
| Neha | 45000 | 4.5 | |
| Arjun | 105000 | 4.6 |
Excel Solution
In D2, enter:
=IF(AND(B2>=100000,C2>=4.5),"Excellent",IF(AND(B2>=75000,C2>=4),"Good",IF(B2>=50000,"Average","Needs Improvement")))
Copy down.
Expected Output
| Employee | Sales | Rating | Performance |
|---|---|---|---|
| Rahul | 120000 | 4.7 | Excellent |
| Priya | 85000 | 4.2 | Good |
| Amit | 65000 | 3.8 | Average |
| Neha | 45000 | 4.5 | Needs Improvement |
| Arjun | 105000 | 4.6 | Excellent |
Question 8: Create a Formatted Employee Joining Date
Problem Statement
Use the Employee ID to find the joining date and display it in a readable format.
Employee Data
| Employee ID | Employee | Joining Date |
|---|---|---|
| E101 | Rahul | 15-Jan-2022 |
| E102 | Priya | 20-Mar-2021 |
| E103 | Amit | 10-Jul-2023 |
| E104 | Neha | 05-Sep-2020 |
| E105 | Arjun | 25-Feb-2024 |
Search Data
| Employee ID | Joining Date |
|---|---|
| E103 | |
| E101 | |
| E105 | |
| E110 | |
| E102 |
Excel Solution
In B9, enter:
=IFERROR(TEXT(XLOOKUP(A9,$A$2:$A$6,$C$2:$C$6),"dd-mmm-yyyy"),"Date Not Found")
Copy down.
Expected Output
| Employee ID | Joining Date |
|---|---|
| E103 | 10-Jul-2023 |
| E101 | 15-Jan-2022 |
| E105 | 25-Feb-2024 |
| E110 | Date Not Found |
| E102 | 20-Mar-2021 |
Concepts Covered
XLOOKUPIFERRORTEXT- Date formatting
- Combined functions
Question 9: Calculate Age Category Using DATEDIF and IF
Problem Statement
Calculate an employee’s age and then categorize them:
- Under 25 →
"Young" - 25 to 40 →
"Adult" - Above 40 →
"Senior"
Excel Data
| Employee | Date of Birth | Age | Category |
|---|---|---|---|
| Rahul | 15-Jun-1998 | ||
| Priya | 20-Mar-1992 | ||
| Amit | 10-Jul-1985 | ||
| Neha | 05-Sep-2003 | ||
| Arjun | 25-Feb-1978 |
Excel Solution
In C2, enter:
=DATEDIF(B2,TODAY(),"Y")
In D2, enter:
=IF(C2<25,"Young",IF(C2<=40,"Adult","Senior"))
Copy both formulas down.
Expected Output
The exact ages will change automatically depending on the current date.
The category will be based on the calculated age.
Concepts Covered
DATEDIFTODAYIF- Nested logical conditions
- Dynamic date calculation
Question 10: Build a Combined Sales Report Formula
Problem Statement
Create a sales report that calculates the final payable amount.
Rules:
- Find the product price using
XLOOKUP. - Multiply price by quantity.
- If quantity is 10 or more, apply a 10% discount.
- If quantity is less than 10, apply a 5% discount.
- Round the final amount.
- If the Product ID does not exist, display
"Invalid Product".
Product Data
| Product ID | Product | Price |
|---|---|---|
| P101 | Keyboard | 850 |
| P102 | Mouse | 550 |
| P103 | Monitor | 12500 |
| P104 | Webcam | 2200 |
| P105 | Headset | 1800 |
Sales Data
| Product ID | Quantity | Final Amount |
|---|---|---|
| P101 | 12 | |
| P103 | 2 | |
| P105 | 15 | |
| P102 | 5 | |
| P110 | 10 |
Excel Solution
In C9, enter:
=IFERROR(ROUND(XLOOKUP(A9,$A$2:$A$6,$C$2:$C$6)*B9*(1-IF(B9>=10,10%,5%)),0),"Invalid Product")
Copy the formula down.
Expected Output
| Product ID | Quantity | Final Amount |
|---|---|---|
| P101 | 12 | 9180 |
| P103 | 2 | 23750 |
| P105 | 15 | 24300 |
| P102 | 5 | 2612.5 |
| P110 | 10 | Invalid Product |
If the cell is formatted as currency or number with zero decimal places, the displayed result may be rounded according to the cell formatting.
Formula Breakdown
The formula combines several Excel functions:
=IFERROR(
ROUND(
XLOOKUP(A9,$A$2:$A$6,$C$2:$C$6)
*B9
*(1-IF(B9>=10,10%,5%)),
0),
"Invalid Product")
It uses:
XLOOKUPto find the product price.IFto determine the discount.- Multiplication to calculate the order amount.
ROUNDto round the final amount.IFERRORto handle an invalid Product ID.
Key Takeaways
- Nested functions mean placing one Excel function inside another.
- Combined functions allow Excel to perform multiple operations in one formula.
IFcan be combined withAND,OR,AVERAGE,ROUND, and lookup functions.IFERRORis useful when a lookup or calculation can produce an error.XLOOKUPcan be combined with calculations to create practical reports.TEXTcan format dates and numbers inside formulas.DATEDIFandTODAYcan be combined for dynamic age calculations.INDEXandMATCHcan be combined withIFERRORfor reliable lookups.ROUNDis useful when calculations produce decimal values.- Complex formulas should still be readable and logically organized.
- Breaking a complicated formula into smaller parts can make troubleshooting easier.
FAQs
1. What is a nested function in Excel?
A nested function is a function placed inside another function.
For example:
=IF(AVERAGE(B2:D2)>=50,"Pass","Fail")
Here, AVERAGE is inside IF.
2. What is a combined Excel formula?
A combined formula uses multiple Excel functions together to complete a calculation.
For example:
=IFERROR(XLOOKUP(A2,B2:B10,C2:C10),"Not Found")
This combines IFERROR and XLOOKUP.
3. Why should I use nested functions?
Nested functions allow you to perform multiple logical or mathematical operations in one formula.
They are useful for:
- Reports
- Dashboards
- Salary calculations
- Grading systems
- Sales analysis
- Data validation
- Business calculations
4. Can IF be combined with AND?
Yes.
=IF(AND(B2>=50,C2>=50),"Pass","Fail")
This checks whether both conditions are TRUE.
5. Can IF be combined with OR?
Yes.
=IF(OR(B2="Yes",C2="Yes"),"Eligible","Not Eligible")
The result is "Eligible" when at least one condition is TRUE.
6. Can XLOOKUP be combined with IFERROR?
Yes.
=IFERROR(XLOOKUP(A2,B2:B10,C2:C10),"Not Found")
This prevents an error from being displayed when the lookup value does not exist.
7. Can I combine lookup functions with mathematical calculations?
Yes. For example:
=XLOOKUP(A2,B2:B10,C2:C10)*D2
This finds a price and multiplies it by quantity.
8. How do I make a complicated Excel formula easier to understand?
Break the logic into smaller parts and test each section separately. You can also use helper columns when a single formula becomes difficult to read or maintain.
9. Can nested formulas make Excel slower?
Very large workbooks containing thousands of complex formulas can become slower, especially when formulas repeatedly process large ranges. Using efficient ranges and appropriate functions can help performance.
10. Should beginners learn nested Excel functions?
Yes. Once basic functions are understood, nested functions are an important step toward advanced Excel because many practical business formulas require more than one operation.
Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.
