Advanced+Excel+Exercises +module+1
Advanced+Excel+Exercises +module+1
Scenario: You need to evaluate sales performance and categorise it based on predefined
criteria.
Dataset:
Instructions:
1. IF Function:
○ Use the IF function to categorize the total sales of each product as "Good" if
the total sales are above 1000, otherwise "Needs Improvement".
○ Formula: =IF(SUM(B2:E2)>1000, "Good", "Needs Improvement")
2. AND Function:
○ Use the AND function to check if the sales for each product are above 100 in
all months.
○ Formula: =IF(AND(B2>100, C2>100, D2>100, E2>100),
"Consistent", "Inconsistent")
3. OR Function:
○ Use the OR function to check if the sales for each product exceeded 300 in
any month.
○ Formula: =IF(OR(B2>300, C2>300, D2>300, E2>300), "High
Sales", "Average Sales")
IF Function
Purpose: Performs a logical test and returns one value if the condition is TRUE and another
if it’s FALSE.
Syntax:
AND Function
Purpose: Checks if all conditions are TRUE. Returns TRUE only if all conditions are met.
Syntax:
OR Function
Purpose: Checks if at least one condition is TRUE. Returns TRUE if any condition is met.
Syntax:
Dataset:
101 Widget A 10
102 Widget B 15
103 Widget C 20
Instructions:
1. VLOOKUP:
○ Use the VLOOKUP function to find the price of "Widget B".
○ Formula: =VLOOKUP("Widget B", B2:C4, 2, FALSE)
2. INDEX and MATCH:
○ Combine INDEX and MATCH to find the price of "Widget C".
○ Formula: =INDEX(C2:C4, MATCH("Widget C", B2:B4, 0))
The formulas VLOOKUP and the combination INDEX and MATCH both perform lookup
operations in Excel, but they differ in functionality, flexibility, and use cases.
Usage:
● Vertical Lookup: VLOOKUP stands for Vertical Lookup. It searches for the value in
the first column of the specified range and returns a value from a specified column in
the same row.
● Simple and Intuitive: It's straightforward to use for simple lookups where the lookup
column is to the left of the return column.
Limitations:
● Fixed Structure: The lookup value must be in the first column of the table array.
● Less Flexible: It cannot look to the left of the lookup column or handle more complex
scenarios.
● Performance: May be slower with large datasets.
Usage:
● Flexibility: INDEX and MATCH can look up values in any direction—left, right, up, or
down—making it more versatile than VLOOKUP.
● Dynamic Arrays: They allow for more dynamic ranges and arrays, which can
change based on other calculations.
● Two-Part Function: While more complex, this combination is powerful for more
advanced lookup requirements.
● Use VLOOKUP:
○ When the data structure is simple and you are looking up values to the right
of the lookup column.
○ When ease of use and quick setup are priorities.
○ When working with small to moderately sized datasets.
● Use INDEX and MATCH:
○ When you need to look up values to the left of the lookup column or in any
direction.
○ When dealing with large datasets where performance is a concern.
○ When you need more flexibility and dynamic range references.
○ When working with complex datasets that require advanced lookup
capabilities.
VLOOKUP Function
Purpose: Searches for a value in the first column of a table and returns a value in the same
row from another column.
Syntax:
INDEX Function
Purpose: Returns the value of a cell at a specific row and column in a range.
Syntax:
MATCH Function
Dataset:
Product Code
A12345
B67890
C54321
D98765
E24680
Instructions:
TEXT Function
=TEXT(value, format_text)
LEFT Function
Purpose: Extracts a specific number of characters from the start (left) of a text string.
Syntax:
=LEFT(text, num_chars)
RIGHT Function
Purpose: Extracts a specific number of characters from the end (right) of a text string.
Syntax:
=RIGHT(text, num_chars)
MID Function
Purpose: Extracts a specific number of characters from the middle of a text string.
Syntax:
=MID(text, start_num, num_chars)
LEN Function
=LEN(text)
SUBSTITUTE Function