Help with Excel functions

Copper Contributor

Hello Community,

I'm in desperate need of help with a problem for my accounting class. I've attached the file. The problem is: In cell H6, enter a formula to determine any discount that should be applied. If the payment method was Express Miles or Rewards, the customer should receive the discount shown in B42. If no discount should be applied, the formula should return a zero. Use the named range for cell B42, not the cell address, in this formula. Copy the function down the column to cell H32. I've tried all types of variations of the =IF function and I got nowhere.  Thanks for the help.

6 Replies

That could be like

=IFERROR(IF(OR(F6="Express Miles",F6="Rewards"),VLOOKUP(A6,RentalRates,2,FALSE),0),0)

Thank you for your response. I hope I have some luck.

You need to give a name to cell B42 if it does not already have one.  highlight that cell and check in the upper left box that shows cell addresses.  If it doesn't say B42, then it has a name.

The formula could be a nested if statement.  Have the first one check the contents of the payment method to see if it says "Rewards", and the if true part of the formula would show the amount charged times the B42 cell, but instead of writing B42, you would click on that cell which should automatically enter the name.  You could also just enter the name.  Then the if false portion of the formula would be the nested IF formula which does the same thing except it check for "Express Miles", with results if true would be the charged amount times that same range name for the discount.  The if false portion of the formula would be zero "0").  You should be able to just copy this down to the rest of the cells.

Hello Yasmin,

 

For H6, you may use any of these formulas: 

1. IF function: =IF(OR(F6={"Express Miles","Rewards"}),
E6*G6*Discount,
0)

2. Boolean formula: =OR(F6={"Express Miles","Rewards"})*
E6*G6*Discount

 

You can then copy your chosen formula down to H32. 

Cheers!

 

Twifoo

@TwifooHow do I count when the number of rentals is all words and not a number function?

 

@JWSLCC 

Plkease explain. How would "number of rentals" be words?