REALLY SIMPLY question

flyfishing2542

New Member
Joined
Jan 27, 2009
Messages
11
I have this monster string of code that I need to shorten because the code is just to big. There are a few Values that I want to return the same information.

However I dont know how to make the different values = same result without the long code.

Is there an "or" command that would allow me to say for example...
=if(a1="EU" or "EEU" or "A", ...?

I think this is probably some basic code that either A I never learned or B I am just slow.

Here is a copy of this monster... please help.

=SUM(IF(A10="PRC","0",IF(Sheet1!T42="EU",IF(Sheet1!Q42>=99.99,"$25.00",IF(Sheet1!Q42>=70,"$17.00",IF(Sheet1!Q42>=10,"$8.50",IF(Sheet1!Q42=9.99,"$5.00"," ")))),IF(Sheet1!T42="EEU",IF(Sheet1!Q42>=99.99,"$25.00",IF(Sheet1!Q42>=70,"$17.00",IF(Sheet1!Q42>=10,"$8.50",IF(Sheet1!Q42=9.99,"$5.00"," ")))),IF(Sheet1!T42="BEU",IF(Sheet1!Q42>=99.99,"$25.00",IF(Sheet1!Q42>=70,"$17.00",IF(Sheet1!Q42>=10,"$8.50",IF(Sheet1!Q42=9.99,"$5.00"," ")))),IF(Sheet1!T42="A",IF(Sheet1!Q42>99.99,"$40.00",IF(Sheet1!Q42>=70,"$35.00",IF(Sheet1!Q42>=10,"$15.00",IF(Sheet1!Q42<=9.99,"$10.00",)))),IF(Sheet1!T42="RPO","$10.00",IF(Sheet1!T42="PRC","PRC",IF(Sheet1!T42="XXX","Returned","")))))))),IF(B10=" "," ",IF(D10<=32%,"$5.00",IF(D10<=39%,"$12.00",IF(D10<=49%,"$14.00",IF(D10<=59%,"$16.00",IF(D10>=60%,"$20.00","none")))))))
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
=SUM(IF(A10="PRC","0",
IF(OR(Sheet1!T42="EU",Sheet1!T42="EEU",Sheet1!T42="BEU"),LOOKUP(Q42,{0,9.99,10,70,99.9},{"",5,8.5,17,25}),
IF(Sheet1!T42="A",LOOKUP(Q42,{0,70,99.9},{10,15,35,40}),
IF(ISNA(VLOOKUP(Sheet1!T42,{"RPO","$10.00";"PRC","PRC";"XXX","Returned"},2,FALSE)),VLOOKUP(Sheet1!T42,{"RPO","$10.00";"PRC","PRC";"XXX","Returned"},2,FALSE),
IF(B10="","",LOOKUP(D10,{0,0.32,0.39,0.49,0.59,0.6},{5,12,14,16,20,""})))))))
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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