View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default A formula that is too complex for Excel?

Give this a whirl

=INDEX({"Naquida";"Carbon Nano Tubes";"Moon
Rock";"Diamond";"Platinum";"Gold";"Silver";"Bronze ";"none"},
MAX(MATCH(C2+E2,{999999;10000.39;9001.32;8006.41;6 789.95;1965.45;499.99;186.
45;117.5},-1),
MATCH(B2+D2,{999999;275;198;173;111;70;27;19;12},-1)))

--
HTH

Bob Phillips

(replace xxxx in email address with googlemail if mailing direct)

"trex005" wrote in
message ...

Because that assumes that there is consistency between the tiers, which
is easy to write without, but even more because it assumes that there
is consistency within the tier, it does not work. I'm sure that there
is a way to write it, but it is too much for my little brain to handle!
if you look at the last sample I gave, you will see that I used more
realistic numbers.

Thank you everyone for your help already given, and the help you are
still providing!

Bob Phillips Wrote:
trex,

This is where you use Harlan's little beauty of an alternative.


=LOOKUP(MIN(INT((C2+E2)/1000),INT((B2+D2)/100)),{-1E+300;1;2;3;4;5;6;7;8},

{"none";"Bronze";"Silver";"Gold";"Platnum";"Diamon d";"MoonRock";"CarbonNanoT
ubes";"Naquida"})

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"trex005" wrote
in
message ...

Wow, this is a great wealth of information! My problem is that I

have a
JavaScript (don't laugh, I needed something that someone could run

on
any computer, modify the source and run again) program that is

writing
this and many other formulas that takes user input of the "tiers".
I have to output many formula's, and I was using other formulas that

I
was outputting and simply nesting them into the other formulas.

This
would work if I could nest unlimited, but I guess that is not the

case.
Instead I decided, with your guys help, that I was just going to have

to
write each formula on it's own.
Now my program outputs this :
=IF(OR(C2+E2<1000,B2+D2<100),"none",
IF(OR(C2+E2<2000,B2+D2<200),"Bronze",
IF(OR(C2+E2<3000,B2+D2<300),"Silver",
IF(OR(C2+E2<4000,B2+D2<400),"Gold",
IF(OR(C2+E2<5000,B2+D2<500),"Platinum",
IF(OR(C2+E2<6000,B2+D2<600),"Diamond",
IF(OR(C2+E2<7000,B2+D2<700),"MoonRock",
"CarbonNanoTubes")))))))
(exactly what you guys were simplifying to)
Unfortunatly, I still then hit the nesting limit as soon as I add

one
more tier
=IF(OR(C2+E2<1000,B2+D2<100),"none",
IF(OR(C2+E2<2000,B2+D2<200),"Bronze",
IF(OR(C2+E2<3000,B2+D2<300),"Silver",
IF(OR(C2+E2<4000,B2+D2<400),"Gold",
IF(OR(C2+E2<5000,B2+D2<500),"Platinum",
IF(OR(C2+E2<6000,B2+D2<600),"Diamond",
IF(OR(C2+E2<7000,B2+D2<700),"Moon Rock",
IF(OR(C2+E2<8000,B2+D2<800),"Carbon Nano Tubes",
"Naquida"))))))))
So I guess I do need to go with a lookup system of sorts. I was

looking
at dadylonglegs and it looked good, except my tier levels will
constantly be changing and will not be as reliable as my sample

data.
It will more likely look something like this :
=IF(OR(C2+E2<117.5,B2+D2<12),"none",
IF(OR(C2+E2<186.45,B2+D2<19),"Bronze",
IF(OR(C2+E2<499.99,B2+D2<27),"Silver",
IF(OR(C2+E2<1965.45,B2+D2<70),"Gold",
IF(OR(C2+E2<6789.95,B2+D2<111),"Platinum",
IF(OR(C2+E2<8006.41,B2+D2<173),"Diamond",
IF(OR(C2+E2<9001.32,B2+D2<198),"Moon Rock",
IF(OR(C2+E2<10000.39,B2+D2<275),"Carbon Nano Tubes",
"Naquida"))))))))
Is there an easy way to do this?


--
trex005

------------------------------------------------------------------------
trex005's Profile:

http://www.excelforum.com/member.php...o&userid=34724
View this thread:

http://www.excelforum.com/showthread...hreadid=544888



--
trex005
------------------------------------------------------------------------
trex005's Profile:

http://www.excelforum.com/member.php...o&userid=34724
View this thread: http://www.excelforum.com/showthread...hreadid=544888