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
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,125
Messages
5,599,843
Members
414,342
Latest member
K Darrell Smith

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