# Odd question, probably easy answer

#### dowcraig

##### New Member
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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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:
Thanks, but it gives me a "The formula you typed contains an error.

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,""))))

Says there was an error in the forumla.

Says there was an error in the forumla.
That appears to be working... not sure if the numbers make sense but it's not saying it's an error and computes something.

Thanks.

Craig

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

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.

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

Thanks.

Your last condition will never be triggered then.

Your last condition will never be triggered then.

These are dollars that will never have a decimal place, I don't think. Still a problem?

Replies
0
Views
311
Replies
8
Views
361
Replies
3
Views
1K
Replies
10
Views
498
Replies
1
Views
343

1,219,892
Messages
6,150,814
Members
450,985
Latest member
Andynair7

### 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.

### Which adblocker are you using?

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

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