Sometimes you get too close to the tree to see the forest...
What version of Excel are you using? Versions prior to XL 07 have a
limit of 7 nested functions.
Dave
On Sep 20, 3:26 pm, MJW wrote:
Ok, while this may be an easy way to induce contempt, notoriety and maybe
even a few death threats, can anyone see anything wrong with this formula?
Yes, I probably could have used ranges, I know. At any rate, I can't seem to
figure out why this doesn't work, and considering the fact that the formula's
more painfully-long than it is complex, I'm pretty sure I'm just missing
something obvious. All the character ref lengths are accurate, and I didn't
see anything off with the parentheticals, so I'm sort of befuddled as to
what's causing the formula to fail.
=if(right(p2,2)="yr", if(or(left(p2,7)="ASP1 yr", left(p2,7)="ASP 1yr",
left(p2,8)="ASP 1 yr"), "A1", if(or(left(p2,9)="Basic1 yr", left(p2,9)="Basic
1yr", left(p2,10)="Basic 1 yr"), "CC1", if(or(left(p2,11)="Premium1 yr",
left(p2,11)="Premium 1yr", left(p2,12)="Premium 1 yr"), "CC+1",
if(or(left(p2,7)="ASP3 yr", left(p2,7)="ASP3 yr", left(p2,8)="ASP 3 yr"),
"A3", if(or(left(p2,9)="Basic 3yr", left(p2,9)="Basic3 yr",
left(p2,10)="Basic 3 yr"), "CC3", if(or(left(p2,11)="Premium 3yr",
left(p2,11)="Premium3 yr", left(p2,12)="Premium 3 yr"), "CC+3",
if(or(left(p2,7)="ASP5 yr", left(p2,7)="ASP 5yr", left(p2,8)="ASP 5 yr"),
"A5", if(or(left(p2,9)="Basic 5yr", left(p2,9)="Basic5 yr",
left(p2,10)="Basic 5 yr"), "CC5", if(or(left(p2,11)="Premium5 yr",
left(p2,11)="Premium 5yr", left(p2,12)="Premium 5 yr"), "CC+5"))))))))), "")
If anyone figures this out and is in the northeast, I'd be more than happy
to buy you a drink. Or several. (I may entertain the notion of giving you
my firstborn child, too.)
Thanks,
Jamie
|