Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please solve the question step by step in excel sheet using VBA-more complex user defined function on excel Part 3: VBA- More Complex User-defined Functions
please solve the question step by step in excel sheet using VBA-more complex user defined function on excel
Part 3: VBA- More Complex User-defined Functions An Airline charges $70 for a checked bag under 35 Kg but $100 if the bag is over this weight. A passenger can check no more than 2 bags. Write a function to compute the charges given the number of bags and the weight of each bag. If the number of bags is more than 2 the function should return the text message "Only two bags allowed" instead of a number and exit the function Test you function for the following cases Number of Bags Weight 1 Weight 2 0 1 90 KG 2 30 KG 20 KG 2 25 KG 40 KG 2 45 KG 45 KG 3 20 KG Note that the function takes 3 inputs: the number of bags, the weight of the first bag, and the weight of the second bag. If the weight doesn't exist then it is considered 0 N W1 W2 Bag Charge 0 1 90 30 2 2. 2. 20 40 25 45 N 45 3 20 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