Log in

No account? Create an account

Previous Entry | Next Entry

=IF(VLOOKUP(G8,'[1107 Product (Achieve) - Active.xls]Product'!$C:$T,18,FALSE)/5>VLOOKUP(H8,'[1107 Product (Achieve) - Active.xls]Product'!$C:$T,18,FALSE),VLOOKUP(G8,'[1107 Product (Achieve) - Active.xls]Product'!$C:$T,18,FALSE)/5,VLOOKUP(H8,'[1107 Product (Achieve) - Active.xls]Product'!$C:$T,18,FALSE))

Yay! Four v-lookups in a single equation!


( 5 comments — Leave a comment )
Nov. 16th, 2005 03:01 pm (UTC)
It frightens me that I can parse that at first glance.

Of course, in a proper scripting language, you'd be able to pop the results of the two VLOOKUP commands onto a temporary variable stack of some sort, and your equation would refer to those variables, rather than having to do the extraneous third VLOOKUP (since the THEN and ELSE portions of your IF statement are both VLOOKUPs you already performed during the conditional portion of the IF statement).
Nov. 16th, 2005 04:09 pm (UTC)
Yeesh, well, I haven't done any programming since my 10th-grade BASIC course, so I'm a bit rusty...
Nov. 16th, 2005 03:19 pm (UTC)
Surely this can be neatly simplified using the =MAX(VLOOKUP(1)/5,VLOOKUP(2)) command? :)

Though let's not start any Excel Formulae Wars, now! :)
Nov. 16th, 2005 04:08 pm (UTC)
No, no, you're right, and I'm better for it...
Nov. 18th, 2005 03:46 am (UTC)
*wipes his screen*
( 5 comments — Leave a comment )