LOOKUP Function or NOT ???


Posted by Rick Alford on September 13, 2000 1:59 AM

I've got a simple one I'm sure.

I've tried to use VLookup and HLookup but no luck. Maybe this is not the right function.

cells C1..L1 have field data names as follows: 2212,2213,2214,2215 etc.

cells C2..L2 have numeric data like
1,2,32,45, etc

At A2 if I enter a field name of 2212 I would like B2 to = the cooresponding cell in that column or 1

if I entered 2214 then B2 would equal 32 using my example above.

Any help would be appreciated,
Rick


Posted by Celia on September 13, 0100 2:20 AM


Rick
Put this formula in B2 :-
=IF(ISNA(HLOOKUP(A2,C1:L2,2,FALSE)),"",HLOOKUP(A2,C1:L2,2,FALSE))
Celia




Posted by Rick Alford on September 13, 0100 2:37 AM


Celia,

Thanks for the QUICK RESPONSE !

It worked great!

What was I missing??

Rick