#VALUE! with if great than or less than x then do this formula

TeressaJP

New Member
Joined
Oct 10, 2011
Messages
13
my formula below is returning #VALUE

What I need is: If C2 is "New" and G2 is less than 7 but greater than 3 then return .0.1; If G2 is less than 5 but greater than 3 then return .0125; If G2 is less than 3 but greater than 0 then return .015; if G2 equals zero then return zero.

If C2 is "Renewal" follows same as above but with different returns. What am I doing wrong?


'=IF(C2="New",IF(G2<7>3,0.01,IF(G2<5>3,0.0125,IF(G2<3>0,0.015,IF(G2=0,0.02,0))))),IF(C2="Renewal",IF(G2<4>3,0.01,IF(G2<3>0,0.015,IF(G2=0,0.02,0))),0)
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Some guessing, change the red bits to what you're wanting:
Code:
=IF(C2="New",INDEX({0.01;0.0125;0.015;0.2},MATCH(G2,{7;5;3;0},-1)),IF(C2="Renewal",INDEX({[COLOR=red]1;1.25;1.5;2[/COLOR]},MATCH(G2,{7;5;3;0},-1)),[COLOR=red]"Not 'New' Or 'Renewal'"[/COLOR]))

AWESOME! THANKS!!! :biggrin:
 
Upvote 0
OK. There are lots and lots of ways to do this.

This isn't necessarily the best one, but it works and should be easy to understand.
Code:
=IF(G2=0,0.2,IF(G2<3,0.015,IF(C2="New",IF(G2<5,0.0125,IF(G2<7,0.01,0)),IF(G2<4,0.01,0))))

Note, this assumes that there are only two possible values for C2. It assumes that C2 would never be blank.
 
Upvote 0
OK. There are lots and lots of ways to do this.

This isn't necessarily the best one, but it works and should be easy to understand.
Code:
=IF(G2=0,0.2,IF(G2<3,0.015,IF(C2="New",IF(G2<5,0.0125,IF(G2<7,0.01,0)),IF(G2<4,0.01,0))))

Note, this assumes that there are only two possible values for C2. It assumes that C2 would never be blank.

IT WORKED! YEAH! THANKS. :biggrin:
 
Upvote 0
Some guessing, change the red bits to what you're wanting:
Code:
=IF(C2="New",INDEX({0.01;0.0125;0.015;0.2},MATCH(G2,{7;5;3;0},-1)),IF(C2="Renewal",INDEX({[COLOR=red]1;1.25;1.5;2[/COLOR]},MATCH(G2,{7;5;3;0},-1)),[COLOR=red]"Not 'New' Or 'Renewal'"[/COLOR]))

This works but i have one remaining issue. :( There will be numbers greater than seven. How do I handle those? If greater than 7 the return should be .5
 
Upvote 0
This works but i have one remaining issue. :( There will be numbers greater than seven. How do I handle those? If greater than 7 the return should be .5

untested ('cos I just extended the formula here, not in Excel):

Code:
=IF(C2="New",INDEX({[COLOR=Blue]0.5;[/COLOR]0.01;0.0125;0.015;0.2},MATCH(G2,{[COLOR=Blue]200;[/COLOR]7;5;3;0},-1)),IF(C2="Renewal",INDEX({[COLOR=Blue]5;[/COLOR]1;1.25;1.5;2},MATCH(G2,{[COLOR=Blue]200;[/COLOR]7;5;3;0},-1)),"Not 'New' Or 'Renewal'"))
 
Upvote 0
Here's one way.
I haven't tested it, but it probably works
Code:
=IF(G2>7,0.5,IF(G2=0,0.2,IF(G2<3,0.015,IF(C2="New",
IF(G2<5,0.0125,IF(G2<7,0.01,0)),IF(G2<4,0.01,0)))))

What do you want to do if G2=7 exactly ?
Maybe change >7 to >=7.
Or change <7 to <=7.
 
Upvote 0
untested ('cos i just extended the formula here, not in excel):

Rich (BB code):
=if(c2="new",index({0.5;0.01;0.0125;0.015;0.2},match(g2,{200;7;5;3;0},-1)),if(c2="renewal",index({5;1;1.25;1.5;2},match(g2,{200;7;5;3;0},-1)),"not 'new' or 'renewal'"))

perfect! Thanks. :)
 
Upvote 0

Forum statistics

Threads
1,216,050
Messages
6,128,498
Members
449,455
Latest member
jesski

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