create a new formula?

J

James Cornthwaite

I am using the nested functions below

"=if(vlookup(1, GRID, 3,false) = 0, (1, GRID, 4, false), (1, GRID, 3,
false))"

i.e for the row with the digit one in its first column return the value in
the third column else if empty return the value in the fourth column.

my problem is i am repeatedly using the line above exactly only changing the
value i am searching for (1 in this case ))

so ideally i'd like to do something like

define myformula(X) = if(vlookup(X, GRID, 3,false) = 0, (X, GRID, 4, false),
(X, GRID, 3, false))

is this possible?????????
 
D

Domenic

Assuming that the third and fourth column contain numerical values,
try...

=LOOKUP(9.99999999999999E+307,VLOOKUP(1,GRID,{4,3},0))

If they contain text values, replace...

9.99999999999999E+307

with

REPT("z",255)

Hope this helps!
 
Top