Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Ask user for a city name. In Excel, name first cell of employee table, then in VBA use a range variable to record current employee
Ask user for a city name. In Excel, name first cell of employee table, then in VBA use a range variable to record current employee table (with labels). |
Filter the table for the given city name. Copy/paste the filtered table and record the pasted table in a range variable. |
Calcualte the maximum number of nights from the filtered table. Find the name of the employee who will stay the maximum number of nights. |
Hint: Use Application.WorksheetFunction.Match and Range().Cells. Delete the pasted range and select the first cell of the employee table. |
Display a message: "Employee name will be in City Name the max number of nights: max number" with title "Max Nights in City Name". |
Remove filter from employee table. |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started