• 410K Members
• 7,612 Online
• 466K Conversations

New Contributor

# Help with Excel functions

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.

4 Replies

# Re: Help with Excel functions

That could be like

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

# Re: Help with Excel functions

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

# Re: Help with Excel functions

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.

# Re: Help with Excel functions

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

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies