Vlookup question

A

acss

New to excell and i would like to utilize vlookup to avoid repetitive steps.
I have the formula for a two column list =VLOOKUP(A9,A1:B7,2,FALSE) but not
sure how to configure going horizontal like from A1 TO E1 can someone assit
please?
 
T

T. Valko

Use HLOOKUP. It works the same as VLOOKUP only horizontaly.

=HLOOKUP(A9,A1:E2,2,0)

In VLOOKUP you define the column_index_number but in HLOOKUP you define the
row_index_number.
 
A

acss

Hi,

I have my text value in a1 and would like a number to appear in e1 so in
your response how would i configure the formula?
 
T

T. Valko

I may have misunderstood what you're trying to do.

Can you provide more specific details?
 
A

acss

My goal is to have two lists, one for an description and another for an
account. I thought to have a drop down list in A2 for a DESCRIPTION and when
a certain description is selected then a corresponding account would appear
in E2. Is this not what vlookup is for? New to excell sorry for confusion!
 
T

T. Valko

Yes, but you asked how to go from a vertical lookup to a horizontal lookup.

A1 = lookup value = X

Vertical lookup table in the range D1:E5

V...Bob
W...Sue
X...Sam
Y...Tia
Z...Tom

=VLOOKUP(A1,D1:E5,2,0) returns Sam

Horizontal lookup table in the range D1:H2

...V......W......X.......Y......Z
Bob...Sue...Sam....Tia...Tom

=HLOOKUP(A1,D1:H2,2,0) returns Sam

The only difference between H/VLOOKUP is in VLOOKUP you tell it what
*column* to look in for the result and with HLOOKUP you tell it what *row*
to look in for the result.
 
T

T. Valko

That just boils down to user preference.

You could put the table on one sheet (you can even hide that sheet) and use
the formula on another sheet:

=HLOOKUP(A1,Sheet10!D1:H2,2,0)
 

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