Odd question, probably easy answer

dowcraig

New Member
Joined
Jan 14, 2009
Messages
36
I'm trying to work on something that will allow me to do something if two results equal something...
so

If cell C4>499999 AND Cell C7=1, then multiply contents of cell C5 by .45
If cell C4>499999 and cell C7=2, then multiply contents of cell C5 by .55
If cell C4>499999 and cell C7=3, then multiply contents of cell C5 by .65
If cell C4>499999 and cell C7=4, then multiply contents of cell C5 by .85
If cell C4>499999 and cell C7=5, then multiply contents of cell C5 by 1.00
If cell C4<500000 and cell C7>1, then multiply contents of cell C5 by .70
If cell C4<500000 and cell C7=1, then multiply contents of cell C5 by .50

and i just can't seem to get that into a forumla that works.

Thoughts?

Thanks,
Craig
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

c_m

Well-known Member
Joined
May 29, 2008
Messages
836
Untested but Try:
=if(and(C4>499999,or(C7=1,C7=2,C7=3,C7=5,C7=5)), C5*lookup(C7,{1;2;3;4;5),{0.45;0.55;0.65,0.85,1.00}),if(C4<500000,if(C7>1,C5*0.70,if(C7=1,C5*0.5,""))))
 
Last edited:

c_m

Well-known Member
Joined
May 29, 2008
Messages
836
Thanks, but it gives me a "The formula you typed contains an error.
Try:
=IF(AND(C4>499999,OR(C7=1,C7=2,C7=3,C7=4,C7=5)), C5*LOOKUP(C7,{1,2,3,4,5},{0.45,0.55,0.65,0.85,1}),IF(C4<500000,IF(C7>1,C5*0.7,IF(C7=1,C5*0.5,""))))
 

dowcraig

New Member
Joined
Jan 14, 2009
Messages
36

ADVERTISEMENT

Says there was an error in the forumla.
 

c_m

Well-known Member
Joined
May 29, 2008
Messages
836

ADVERTISEMENT

What if C4 = 499999.5 and C7 = 3, what would the desired answer be? Conditions 3 and 6 are both valid here.
 

dowcraig

New Member
Joined
Jan 14, 2009
Messages
36
What if C4 = 499999.5 and C7 = 3, what would the desired answer be? Conditions 3 and 6 are both valid here.

Good eye... ultimately, I don't know if that'll ever happen, but thanks for pointing that out.

Thanks.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,707
Messages
5,833,241
Members
430,199
Latest member
Petty queen

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
Top