Assignments Of Class 7: Advanced Formulas and Functions

Rashmi Mishra

  

Assignments Of Class 7: Advanced Formulas and Functions

Advanced Formulas and Functions - Assignments with Steps and Solutions

Below are a few assignments based on the concepts of Logical FunctionsLookup Functions, and Text Functions covered in the lecture notes. Each assignment includes step-by-step instructions and solutions to reinforce learning.



Assignment Example:

Assignment 1: Using Logical Functions

Task: Determine if an employee gets a bonus based on performance in two categories. The employee must score 80 or above in both categories to receive a bonus.

Solution: Use the AND function combined with IF:

=IF(AND(A1>=80, B1>=80), "Bonus", "No Bonus")

This formula checks if both scores are 80 or higher and returns "Bonus" if true, or "No Bonus" if false.


Assignment 2: Lookup Function (VLOOKUP)

Task: Use VLOOKUP to find the price of a product based on its name from a list of products and prices.

Solution:

=VLOOKUP("Product A", A2:B10, 2, FALSE)

This formula searches for "Product A" in the first column of the range A2:B10 and returns the corresponding price from the second column.


Assignment 3: Text Function (CONCATENATE)

Task: Combine the first name in cell A1 and the last name in cell B1, separating them with a space.

Solution:

=CONCATENATE(A1, " ", B1)

This formula combines the values of cells A1 and B1 with a space in between.


Conclusion:

In this lesson, we covered three advanced categories of functions in Excel: Logical Functions (IF, AND, OR), Lookup Functions (VLOOKUP, HLOOKUP, INDEX, MATCH), and Text Functions (CONCATENATE, LEFT, RIGHT, MID). These functions allow you to perform complex calculations, search for data, and manipulate text in powerful ways.

Advanced Formulas and Functions - Assignments with Steps and Solutions

Below are a few assignments based on the concepts of Logical FunctionsLookup Functions, and Text Functions covered in the lecture notes. Each assignment includes step-by-step instructions and solutions to reinforce learning.


Assignment 1: Using Logical Functions (IF, AND, OR)

Problem Statement:

You have a list of student scores in two subjects, Math and English. You need to:

  1. Determine if the student passed or failed based on their Math score (>= 50).
  2. Check if the student passed both Math and English (>= 50 in both).
  3. Check if the student passed either Math or English.

Steps and Solution:

  1. Step 1: Using the IF Function
    • Objective: Determine if the student passed or failed in Math.
    • Formula:

=IF(A2>=50, "Pass", "Fail")

    • Explanation: This formula checks if the Math score (cell A2) is greater than or equal to 50. If true, it returns "Pass"; otherwise, "Fail."
  1. Step 2: Using the AND Function
    • Objective: Determine if the student passed both Math and English.
    • Formula:

=IF(AND(A2>=50, B2>=50), "Passed Both", "Failed One or Both")

    • Explanation: The AND function checks if both the Math score (A2) and English score (B2) are greater than or equal to 50. The IF function then returns "Passed Both" if both are true, or "Failed One or Both" if false.
  1. Step 3: Using the OR Function
    • Objective: Determine if the student passed either Math or English.
    • Formula:

=IF(OR(A2>=50, B2>=50), "Passed One or Both", "Failed Both")

    • Explanation: The OR function checks if either the Math score (A2) or English score (B2) is greater than or equal to 50. The IF function returns "Passed One or Both" if either condition is true, or "Failed Both" if both are false.

Solution Output:

Student

Math Score

English Score

Pass/Fail (Math)

Passed Both Subjects

Passed One or Both

John

65

70

Pass

Passed Both

Passed One or Both

Mary

40

80

Fail

Failed One or Both

Passed One or Both

Alex

50

45

Pass

Failed One or Both

Passed One or Both

Lisa

30

35

Fail

Failed One or Both

Failed Both


Assignment 2: Using Lookup Functions (VLOOKUP, HLOOKUP, INDEX, MATCH)

Problem Statement:

You have a list of products and their prices in a table. Your task is to:

  1. Use VLOOKUP to find the price of a product based on its name.
  2. Use INDEX and MATCH together to look up a price by product name.

Steps and Solution:

  1. Step 1: Using VLOOKUP
    • Objective: Find the price of "Product B" from the table.
    • Table:

Product

Price

Product A

$10

Product B

$15

Product C

$12

    • Formula:

=VLOOKUP("Product B", A2:B4, 2, FALSE)

    • Explanation: The VLOOKUP function searches for "Product B" in the first column of the range A2

and returns the corresponding value from the second column (price).

  1. Solution: The result will be $15.
  2. Step 2: Using INDEX and MATCH
    • Objective: Find the price of "Product C" using INDEX and MATCH.
    • Formula:

=INDEX(B2:B4, MATCH("Product C", A2:A4, 0))

    • Explanation: The MATCH function finds the position of "Product C" in the range A2

(returns 3). The INDEX function then uses this position to return the corresponding price from column B (3rd row).

  1. Solution: The result will be $12.

Solution Output:

Product

Price

Looked-up Price (VLOOKUP)

Looked-up Price (INDEX-MATCH)

Product A

$10

-

-

Product B

$15

$15

-

Product C

$12

-

$12


Assignment 3: Using Text Functions (CONCATENATE, LEFT, RIGHT, MID)

Problem Statement:

You have a list of employee first names and last names. Your task is to:

  1. Combine the first and last names into a full name using CONCATENATE.
  2. Extract the first three letters of the employee’s first name using LEFT.
  3. Extract the last two letters of the employee’s last name using RIGHT.
  4. Extract the middle part of an employee ID using MID.

Steps and Solution:

  1. Step 1: Using CONCATENATE
    • Objective: Combine first name and last name into one full name.
    • Data:

First Name

Last Name

John

Smith

Mary

Johnson

    • Formula:

=CONCATENATE(A2, " ", B2)

    • Explanation: This formula combines the first name in cell A2 and the last name in cell B2 with a space in between.

Solution: The result for John Smith will be "John Smith".

  1. Step 2: Using LEFT
    • Objective: Extract the first three letters of the employee’s first name.
    • Formula:

=LEFT(A2, 3)

    • Explanation: This formula extracts the first 3 characters from the text in cell A2.

Solution: For "John", the result will be "Joh".

  1. Step 3: Using RIGHT
    • Objective: Extract the last two letters of the employee’s last name.
    • Formula:

=RIGHT(B2, 2)

    • Explanation: This formula extracts the last 2 characters from the text in cell B2.

Solution: For "Smith", the result will be "th".

  1. Step 4: Using MID
    • Objective: Extract the middle three characters from an employee ID "EMP12345".
    • Formula:

=MID("EMP12345", 4, 3)

    • Explanation: This formula extracts 3 characters starting from the 4th position in the string "EMP12345".

Solution: The result will be "123".

Solution Output:

First Name

Last Name

Full Name

First 3 Letters (LEFT)

Last 2 Letters (RIGHT)

Middle of ID (MID)

John

Smith

John Smith

Joh

th

123

Mary

Johnson

Mary Johnson

Mar

on

123


Assignment 4: Combining Functions to Solve Complex Problems

Problem Statement:

You have a dataset that contains employee IDs, names, and their departments. Your task is to:

  1. Extract the numeric part of the employee ID.
  2. Use IF to check if the employee works in the "Sales" department.
  3. Combine the employee’s name and department into a single string using CONCATENATE.

Steps and Solution:

  1. Step 1: Extract the Numeric Part of the Employee ID
    • Objective: Extract the number from an employee ID like "EMP123".
    • Formula:

=MID(A2, 4, LEN(A2)-3)

    • Explanation: The MID function extracts the part of the ID starting from the 4th character to the end. LEN(A2)-3 calculates the number of characters to extract, excluding the "EMP" prefix.

Solution: For "EMP123", the result will be "123".

  1. Step 2: Use IF to Check if Employee is in Sales Department
    • Objective: Check if the employee belongs to the "Sales" department.
    • Formula:

=IF(B2="Sales", "Yes", "No")

    • Explanation: This IF function checks if the department in cell B2 is "Sales". If true, it returns "Yes"; otherwise

Assignment 5: Nested Functions

Problem Statement:

Using the following data, create a formula that:

  1. Combines the results of logical functions using IF with VLOOKUP.
  2. Create a dynamic message based on employee scores.

Data Table:

Employee ID

Employee Name

Score

E001

John

85

E002

Mary

60

E003

Alex

45

E004

Lisa

90

Steps and Solution:

  1. Step 1: Using VLOOKUP to Get Score
    • Objective: Retrieve the score of an employee based on their ID.
    • Formula:

=VLOOKUP("E002", A2:C5, 3, FALSE)

    • Explanation: This formula looks for the employee ID "E002" in the range A2

and returns the corresponding score from the third column.

  1. Solution: For "E002", the result will be 60.
  2. Step 2: Using IF to Create a Dynamic Message
    • Objective: Generate a message based on the score retrieved.
    • Formula:

=IF(VLOOKUP("E002", A2:C5, 3, FALSE) >= 75, "Great job!", "Needs Improvement")

    • Explanation: This formula checks if the score for "E002" is greater than or equal to 75. If true, it returns "Great job!"; otherwise, "Needs Improvement".

Solution: The result will be "Needs Improvement".

Solution Output:

Employee ID

Employee Name

Score

Dynamic Message

E001

John

85

Great job!

E002

Mary

60

Needs Improvement

E003

Alex

45

Needs Improvement

E004

Lisa

90

Great job!


Assignment 6: Text Manipulation with Nested Functions

Problem Statement:

Using employee data, perform the following tasks:

  1. Extract the first letter of the first name and concatenate it with the last name.
  2. Convert the full name to uppercase.

Data Table:

Employee ID

First Name

Last Name

E001

John

Smith

E002

Mary

Johnson

E003

Alex

Doe

E004

Lisa

Ray

Steps and Solution:

  1. Step 1: Extract First Letter and Concatenate
    • Objective: Create a new identifier using the first letter of the first name and the last name.
    • Formula:

=LEFT(B2, 1) & C2

    • Explanation: The LEFT function extracts the first character from the first name in cell B2. The & operator concatenates this letter with the last name in cell C2.

Solution: For "John Smith", the result will be "JSmith".

  1. Step 2: Convert Full Name to Uppercase
    • Objective: Convert the full name to uppercase.
    • Formula:

=UPPER(B2 & " " & C2)

    • Explanation: This formula concatenates the first and last names with a space in between and then converts the entire string to uppercase using the UPPER function.

Solution: For "John Smith", the result will be "JOHN SMITH".

Solution Output:

Employee ID

First Name

Last Name

Identifier

Uppercase Name

E001

John

Smith

JSmith

JOHN SMITH

E002

Mary

Johnson

MJohnson

MARY JOHNSON

E003

Alex

Doe

ADoe

ALEX DOE

E004

Lisa

Ray

LRay

LISA RAY


Assignment 7: Combining Logical, Lookup, and Text Functions

Problem Statement:

Using the following employee data, create a summary that shows:

  1. The full name of each employee.
  2. A message indicating whether they have a high score (>= 75) or not, using nested functions.
  3. The first three letters of their last name.

Data Table:

Employee ID

First Name

Last Name

Score

E001

John

Smith

85

E002

Mary

Johnson

60

E003

Alex

Doe

70

E004

Lisa

Ray

90

Steps and Solution:

  1. Step 1: Create Full Name
    • Objective: Combine first name and last name.
    • Formula:

excel

Copy code

=B2 & " " & C2

    • Explanation: This formula combines the first name in cell B2 and the last name in cell C2 with a space in between.
  1. Step 2: Message Based on Score
    • Objective: Generate a message based on the score.
    • Formula:


=IF(D2 >= 75, "High Scorer", "Needs Improvement")

    • Explanation: This checks if the score in cell D2 is greater than or equal to 75. If true, it returns "High Scorer"; otherwise, it returns "Needs Improvement".
  1. Step 3: Extract First Three Letters of Last Name
    • Objective: Extract the first three letters of the last name.
    • Formula:

=LEFT(C2, 3)

    • Explanation: This uses the LEFT function to extract the first three characters from the last name in cell C2.

Solution Output:

Employee ID

First Name

Last Name

Score

Full Name

Score Message

Last Name Initials

E001

John

Smith

85

John Smith

High Scorer

Smi

E002

Mary

Johnson

60

Mary Johnson

Needs Improvement

Joh

E003

Alex

Doe

70

Alex Doe

Needs Improvement

Doe

E004

Lisa

Ray

90

Lisa Ray

High Scorer

Ray


Conclusion

These assignments encourage students to apply various advanced Excel functions in real-world scenarios. By integrating different functions such as IF, VLOOKUP, and text functions, students can develop a robust understanding of Excel's capabilities. You can encourage students to modify the data and formulas for additional practice and exploration.