LOOKUP Function gives wrong results

A

AndreasW

I have the following sheet:
A B C D E F
1 qwe rtz uio asd fgh jkl
2 1 2 3 4 5 6
3
4 qwe =LOOKUP(A4;$A$1:$K$2)

The function in B4 should return "1", but it returns "6". The value changes
if I delete some columns (e.g. if I delete columns D,E, and F, I get a
correct value).
When I am using just "a", "b", "c" instead names like "qwe", "rtz",... I get
the correct values. What am I doing wrong?
I am using XP and Excel 2003
 
M

Mike H

I forgot to mention my version of Excel uses , and not ; so change it to ;
after the A4

Mike
 
A

Ashish Mathur

Hi,

Thank for pointing that out - I should have mentioned that in my post.
Anyways, the following formula seems to resolve both the issues

=LOOKUP(2,1/($A$1:$F$1=A4),$A$2:$F$2)

Hope this helps.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 

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