Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

=+ (b) What is the throughput time of 500 parts instead of lOOO?

Answered: 1 week ago

Question

Which of the following is a characteristic of structured processes?

Answered: 1 week ago

Question

1-4 How will MIS help my career?

Answered: 1 week ago