Question: 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
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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!