Exercise 4. The worksheet “Hours” (see attached Excel file) contains the number of hours that 7 employees have worked over the past 100 days. Some employees have not worked in some days. a) Create a function named employee that takes an employee name as parameter and returns the range of cells starting day 1 until the last consecutive day that the employee has worked from day 1. For instance, this range for Alex should be “B2:B27”. b) Create a sub that takes an employee name as input from the user, checks to ensure the name is valid (returns error message if the name is not one of the 7 names) and if the name is valid then calls on function employee to get the range of consecutive days that the employee has worked starting day 1 and then computes the sum of the number of hours the employee has worked over consecutive days since day. This sum should then be written in a new row under the same data with row name “Cons Days” c) Create a sub that builds a table somewhere on the right side of the data in the same worksheet using range variables. The table should include the name of the 7 individuals and the average, median, and standard deviation of the number of the number of hours each individual has worked over the consecutive days the employee has worked starting day 1. I want you to use for loops for this part. You may use call on built in functions of Excel in VBA to perform calculations for average, median, and standard deviation.

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter5: Working With Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 4AYK
icon
Related questions
Question

Exercise 4. The worksheet “Hours” (see attached Excel file) contains the number of hours that 7 employees have worked over the past 100 days. Some employees have not worked in some days.

a) Create a function named employee that takes an employee name as parameter and returns the range of cells starting day 1 until the last consecutive day that the employee has worked from day 1. For instance, this range for Alex should be “B2:B27”.

b) Create a sub that takes an employee name as input from the user, checks to ensure the name is valid (returns error message if the name is not one of the 7 names) and if the name is valid then calls on function employee to get the range of consecutive days that the employee has worked starting day 1 and then computes the sum of the number of hours the employee has worked over consecutive days since day. This sum should then be written in a new row under the same data with row name “Cons Days”

c) Create a sub that builds a table somewhere on the right side of the data in the same worksheet using range variables. The table should include the name of the 7 individuals and the average, median, and standard deviation of the number of the number of hours each individual has worked over the consecutive days the employee has worked starting day 1. I want you to use for loops for this part. You may use call on built in functions of Excel in VBA to perform calculations for average, median, and standard deviation.

 

Please give proper explanation and typed answer only.

Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L