Multiple IF statements

Wally-sns

New Member
Joined
Jun 30, 2006
Messages
46
If i want to have multiple IF statements, how would i write the formula?

In other words, here is the following:

IF the Sales total is LESS THAN 100,000...then multiple Sales by 5%
IF the Sales total is BETWEEN 101,000 and 500,000,..then multiple Sales by 6%
IF the Sales total is GREATER THAN 101,000 and 500,000,..then multiple Sales by 7%

Help is much appreciated !
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I know that sometimes the help files can be hard to understand. What part of what's in the Excel help files was unclear?
 
Upvote 0
Quite welcome. The A1-0.0001 is because otherwise MATCH is going to return the next item in line at the breakpoints. Subtracting a teeny amount makes it so that MATCH will return the "lower" value when A1 is at the breakpoint because the subtraction scoots it just a smidgeon under the threadhold. You could also just adjust the args inside the array so then the formula would read:

=INDEX({0.5,0.6,0.7},MATCH(A1,{0,100000.001,500000.001}))

It's just aesthetics -- which looks prettier. (Some of puritans might say that it's not just aesthetics because the first formula has that subtraction which is one extra operation so there is a performance hit. But the performance hit is akin to the impact of hitting a grasshopper's impact on you gas mileage -- negligable.)
 
Upvote 0
Beautiful....but now how does it know about the greater than , less than, etc....just by only entering the values of 100, 500, etc. ?
 
Upvote 0
Did you look over the help files' info on MATCH()? That's what's providing the 2nd argument into the INDEX() function. You might step through the formula using the formula auditing tool to get a better understanding of it. (Menu option Tools | Formula Auditing | Evaluate Formula)
 
Upvote 0

Forum statistics

Threads
1,218,899
Messages
6,145,094
Members
450,590
Latest member
Naneng

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top