Question: please solve the questions using VBA-more complex user defined functions solve it on excel sheet a Part 3: VBA- More Complex User-defined Functions An Airline

a 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 Charee 0 1 2 20 2 90 30 25 45 20 40 W NN 45 2 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
