Mulitple OR's using IF's?

jerd0708

New Member
Joined
Feb 1, 2012
Messages
4
I have a problem that is driving me crazy.

I have data coming to a cell, it will be between 0.00% and 0.50%

I want to have a weighted percentage using this data.

So if Cell E39 is 0.00% I want E40 to read 0% but if it E39 is 0.01% to 0.10% I want it to read (-10%) 0.011% to 0.20% reads (-20%) and so on up to 0.50 and reading (-50%).

I have tryed all kinds of AND's OR's and IF's and nothing is working. I have a very love hate relationship with Excel!

Thanks to anyone that can help.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Give this a try:

=LOOKUP(E39,{0,0.01,0.11,0.21,0.31,0.41,0.51},{0,-0.1,-0.2,-0.3,-0.4,-0.5,0})

Test it fully to be sure. :)
 
Upvote 0
Code:
=IF(AND(D4>0,D4<=0.1),10,IF(AND(D4>0.1,D4<=0.2),20,IF(AND(D4>0.2,D4<=0.3),30,IF(AND(D4>0.3,D4<=0.4),40,IF(AND(D4>0.4,D4<=0.5),50,"HIGH VALUE")))))

That is another way.

OOPS, missed the negatives...you can adjust the whole numbers in the formula to suit yourself...those are the "if true" values.
 
Upvote 0
Unite!




=IF(AND(E3>0,E3<=0.1),-0.1,IF(AND(E3>0.1,E3<=0.2),-0.2,IF(AND(E3>0.2,E3<=0.3),-0.3,IF(AND(E3>0.3,E3<=0.4),-0.4,IF(AND(E3>0.4,E3<=0.5),-0.5,"HIGH VALUE")))))
 
Upvote 0
In both of them I am just getting a "False"? I am working on it but I can not come up with anything?
 
Upvote 0
The LOOKUP worked I had to change the max value (0) from the results to make it -0.50 so that anything above the highest value was the max. Also had to play with what was coming into E39 a little because it was coming in percentage and the formula did not like it.
I can not thank you guys enough for the help.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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