"LOOKUP" within a condition?

L

Leonhardtk

I have a LOOKUP that works great (Thanks Biff!!!). Now I need to two
seperate "LOOKUP" commands depeneding on contents of a different field.

My exising LOOKUP, which works:
=LOOKUP(TODAY()-INT(AK2), {1,30,60,90,120},{"0-29","30-59", "60-89",
"90-119","Over 120})

(AK2 is the date the row was created in a database, the earliest date is 15
Sep 06).

I now need to look at the value in "V2" to look for "Incident", if so, my
scale will be different. By when I try my "guess", it doesn't work (figure
that!?). The problem is, while scrolling through the formula, I can't ever
get to the "value if true". Here's my feable attempt:

=IF(V2="Incident", LOOKUP(TODAY()-INT(AK2),{1,4,14,"Over
30"},{"0-7","8-13","15-29","Over 30"},LOOKUP(TODAY()-INT(AK2),
{1,30,60,90,120},{"0-29","30-59", "60-89", "90-119","Over 120})))

Appreciate any assistance,

KSL.
 
G

Greg Wilson

Try:

=IF(V2="Incident", LOOKUP(TODAY()-INT(AK2),{1,4,14,"Over
30"},{"0-7","8-13","15-29","Over 30"}),LOOKUP(TODAY()-INT(AK2),
{1,30,60,90,120},{"0-29","30-59","60-89","90-119","Over 120"}))

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top