0% found this document useful (0 votes)
2 views

Assignment-4, Answer

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment-4, Answer

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment-4, Answers

Q.1: How many employees are there in each department (Computer, Finance, Electrical)?
Ans.-To count the number of employees in each department, we can use the COUNTIF
function.Assuming the department names are in column B and the data starts from row 2, you
can use the following formulas:

 Computer Department: =COUNTIF(B2:B7, "COMPUTER")


 Finance Department: =COUNTIF(B2:B7, "FINANCE")
 Electrical Department: =COUNTIF(B2:B7, "ELECTRICAL")

Q.2: How many employees have a basic salary in the Computer Department only?
Ans.-To sum the basic salaries of employees only in the Computer Department, you can use the
SUMIF function.
 Sum of Basic Salary in Computer Department: =SUMIF(B2:B7, "COMPUTER",
C2:C7)

Q.3: What are the post and grade of Manoj and Ashish?
Ans.-To find the post and grade of Manoj and Ashish, you can use the VLOOKUP function.
 Post of Manoj (assuming his name is in cell D3):
=VLOOKUP("MANOJ", B2:F7, 3, FALSE)
 Grade of Manoj:
=VLOOKUP("MANOJ", B2:F7, 5, FALSE)
 Post of Ashish (assuming his name is in cell D8):
=VLOOKUP("ASHISH", B2:F7, 3, FALSE)

 Grade of Ashish:
=VLOOKUP("ASHISH", B2:F7, 5, FALSE)

Q.4: Assign grades ('A', 'B', 'C') based on total salary?


Ans.-To assign grades based on total salary, you can use an IF function.

=IF(G2 > 20000, "A", IF(G2 > 10000, "B", "C"))

Q.5: How many employees are Managers and Guards?


Ans.-To count how many employees are Managers and Guards, you can use the COUNTIF
function.
 Number of Managers: =COUNTIF(C2:C7, "MANAGER")
 Number of Guards: =COUNTIF(C2:C7, "GUARD")

You might also like