Unsure which to use: IF, IF AND or IF THEN Function

KuraiChikara

Board Regular
Joined
Nov 16, 2016
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
I need to show certain percentages if certain numbers come up. The formula can be in A1 and the number can be in B1. Example:

If B1 is equal to 2.9 or less put in a 0
if B1 is equal to 3 but less than 3.5 put 10%
if B1 is equal to 3.5 but less than 4.0 put 15%
if B1 is equal to 4 but less than 4.5 put 20%
if B1 is 4.5 or greater put 25%

I have a general idea of how to do it, I just havent been able to get anything to work.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi,

You can do this:


Book1
ABCDEF
10.00%0.00%2.900.00%
210.00%10.00%3310.00%
315.00%15.00%3.53.515.00%
420.00%20.00%4420.00%
525.00%25.00%4.54.525.00%
625.00%25.00%5
7
8^Format as Percentage
Sheet523
Cell Formulas
RangeFormula
A1=LOOKUP(C1,{0,3,3.5,4,4.5},{0,0.1,0.15,0.2,0.25})
B1=LOOKUP(C1,E$1:E$5,F$1:F$5)


Use A1 formula with Tiers Hard-coded,
Use B1 formula with Tiers in Table E1:F5
 
Last edited:
Upvote 0
Don't use IF at all, this is what VLOOKUP is for:


Excel 2010
ABCDEFGHI
1420%00
2310%
33.515%
4420%
54.525%
Sheet1
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,$H$1:$I$5,2,1)
 
Upvote 0
These are great but my issue is why I included the "equal to but less than and equal to or greater than" information because the numbers I get can be in a range like 3, 3.1, 3.2, 3.41, etc. Those would all result in 10% since my second criteria was "if B1 is equal to 3 but less than 3.5 put 10%" .

A Vlookup could do that, I would just have to incorporate all of the possible values to look at, at and that's alot with what I have to do.

Thank you for your help though. That will help me in other things I have to do.
 
Upvote 0
These are great but my issue is why I included the "equal to but less than and equal to or greater than" information because the numbers I get can be in a range like 3, 3.1, 3.2, 3.41, etc. Those would all result in 10% since my second criteria was "if B1 is equal to 3 but less than 3.5 put 10%" .

A Vlookup could do that, I would just have to incorporate all of the possible values to look at, at and that's alot with what I have to do.

Thank you for your help though. That will help me in other things I have to do.

Did you even try the formulas given by myself and Scott? Our formula covers All those scenarios:


Book1
ABCDEF
10.00%0.00%2.900.00%
210.00%10.00%3310.00%
315.00%15.00%3.53.515.00%
420.00%20.00%4420.00%
525.00%25.00%4.54.525.00%
625.00%25.00%5
710.00%10.00%3
810.00%10.00%3.1
910.00%10.00%3.2
1010.00%10.00%3.41
1110.00%10.00%3.499999999
Sheet523
Cell Formulas
RangeFormula
A1=LOOKUP(C1,{0,3,3.5,4,4.5},{0,0.1,0.15,0.2,0.25})
B1=LOOKUP(C1,E$1:E$5,F$1:F$5)
 
Upvote 0
I apologize, I've never seen your type of formula before and was waiting till I had more time to mess around with it. And it works. I'll figure out how it works later but it works, thank you very much.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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