A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Vlookup Function with Multiple Reference Columns



 
 
Thread Tools Display Modes
  #1  
Old December 30th 08, 06:52 AM posted to microsoft.public.excel.worksheet.functions
Biff
external usenet poster
 
Posts: 57
Default Vlookup Function with Multiple Reference Columns

I posted a question a few days ago, but didn't get an answer so let me give
more detail. I am trying to do a Vlookup in B1 in Worksheet 2 that
references a table in worksheet 1. The reference value though can be found
in either column A, B or C and the results (output) will be three columns
away from the reference column of the table. The Vlookup function looks at
the most left column of the table (so column A). How do I get the function
to look in A, B, C and return a value three columns over from the column it
found the reference value.

Your help is greatly appreciated.

Worksheet 1
A B C D
E F
1 A Code B Code C Code A Results B Results C Results
2 T3ATRHYX T3BTRHYX T3CTRHYX 0.0909 0.1053 0.1739
3 T3ABCHYX T3BBCHYX T3CBCHYX 0.4545 0.3947 0.3478
4 T3ABCITX T3BBCITX T3CBCITX 0.3636 0.3947 0.3478

Worsheet 2

A B C
D
Code Results Input Column OutPut Column
1 T3ATRHYX 0.0909 1 4



Ads
  #2  
Old December 30th 08, 07:35 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,768
Default Vlookup Function with Multiple Reference Columns

I guess it's only fitting that I reply to a post from Biff!

Try this:

=SUMIF(Sheet1!A2:C4,A1,Sheet1!D2:F4)

--
Biff
Microsoft Excel MVP


"Biff" > wrote in message
...
>I posted a question a few days ago, but didn't get an answer so let me give
> more detail. I am trying to do a Vlookup in B1 in Worksheet 2 that
> references a table in worksheet 1. The reference value though can be
> found
> in either column A, B or C and the results (output) will be three columns
> away from the reference column of the table. The Vlookup function looks
> at
> the most left column of the table (so column A). How do I get the
> function
> to look in A, B, C and return a value three columns over from the column
> it
> found the reference value.
>
> Your help is greatly appreciated.
>
> Worksheet 1
> A B C D
> E F
> 1 A Code B Code C Code A Results B Results C Results
> 2 T3ATRHYX T3BTRHYX T3CTRHYX 0.0909 0.1053 0.1739
> 3 T3ABCHYX T3BBCHYX T3CBCHYX 0.4545 0.3947 0.3478
> 4 T3ABCITX T3BBCITX T3CBCITX 0.3636 0.3947 0.3478
>
> Worsheet 2
>
> A B C
> D
> Code Results Input Column OutPut Column
> 1 T3ATRHYX 0.0909 1 4
>
>
>



  #3  
Old December 30th 08, 07:58 AM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 9,221
Default Vlookup Function with Multiple Reference Columns

Another option: a generic construct which will work whether the results to be
returned are text or numbers. SUMIF will fail with text results.

In Sheet2,
Lookup values in A2 down

In B2, copied to D2:
=INDEX(Sheet1!D,MATCH($A2,Sheet1!A:A,0))

Then in E2:
=INDEX(B22,MATCH(TRUE,INDEX(NOT(ISERROR(B22)), ),0))
will return the required result for the lookup value in A2. Copy B2:E2 down
as needed.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"Biff" wrote:
> I posted a question a few days ago, but didn't get an answer so let me give
> more detail. I am trying to do a Vlookup in B1 in Worksheet 2 that
> references a table in worksheet 1. The reference value though can be found
> in either column A, B or C and the results (output) will be three columns
> away from the reference column of the table. The Vlookup function looks at
> the most left column of the table (so column A). How do I get the function
> to look in A, B, C and return a value three columns over from the column it
> found the reference value.
>
> Your help is greatly appreciated.
>
> Worksheet 1
> A B C D
> E F
> 1 A Code B Code C Code A Results B Results C Results
> 2 T3ATRHYX T3BTRHYX T3CTRHYX 0.0909 0.1053 0.1739
> 3 T3ABCHYX T3BBCHYX T3CBCHYX 0.4545 0.3947 0.3478
> 4 T3ABCITX T3BBCITX T3CBCITX 0.3636 0.3947 0.3478
>
> Worsheet 2
>
> A B C
> D
> Code Results Input Column OutPut Column
> 1 T3ATRHYX 0.0909 1 4
>
>
>

  #4  
Old December 30th 08, 05:04 PM posted to microsoft.public.excel.worksheet.functions
Biff
external usenet poster
 
Posts: 57
Default Vlookup Function with Multiple Reference Columns

Thanks Biff. That worked.

"T. Valko" wrote:

> I guess it's only fitting that I reply to a post from Biff!
>
> Try this:
>
> =SUMIF(Sheet1!A2:C4,A1,Sheet1!D2:F4)
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "Biff" > wrote in message
> ...
> >I posted a question a few days ago, but didn't get an answer so let me give
> > more detail. I am trying to do a Vlookup in B1 in Worksheet 2 that
> > references a table in worksheet 1. The reference value though can be
> > found
> > in either column A, B or C and the results (output) will be three columns
> > away from the reference column of the table. The Vlookup function looks
> > at
> > the most left column of the table (so column A). How do I get the
> > function
> > to look in A, B, C and return a value three columns over from the column
> > it
> > found the reference value.
> >
> > Your help is greatly appreciated.
> >
> > Worksheet 1
> > A B C D
> > E F
> > 1 A Code B Code C Code A Results B Results C Results
> > 2 T3ATRHYX T3BTRHYX T3CTRHYX 0.0909 0.1053 0.1739
> > 3 T3ABCHYX T3BBCHYX T3CBCHYX 0.4545 0.3947 0.3478
> > 4 T3ABCITX T3BBCITX T3CBCITX 0.3636 0.3947 0.3478
> >
> > Worsheet 2
> >
> > A B C
> > D
> > Code Results Input Column OutPut Column
> > 1 T3ATRHYX 0.0909 1 4
> >
> >
> >

>
>
>

  #5  
Old December 30th 08, 05:42 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,768
Default Vlookup Function with Multiple Reference Columns

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Biff" > wrote in message
...
> Thanks Biff. That worked.
>
> "T. Valko" wrote:
>
>> I guess it's only fitting that I reply to a post from Biff!
>>
>> Try this:
>>
>> =SUMIF(Sheet1!A2:C4,A1,Sheet1!D2:F4)
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "Biff" > wrote in message
>> ...
>> >I posted a question a few days ago, but didn't get an answer so let me
>> >give
>> > more detail. I am trying to do a Vlookup in B1 in Worksheet 2 that
>> > references a table in worksheet 1. The reference value though can be
>> > found
>> > in either column A, B or C and the results (output) will be three
>> > columns
>> > away from the reference column of the table. The Vlookup function
>> > looks
>> > at
>> > the most left column of the table (so column A). How do I get the
>> > function
>> > to look in A, B, C and return a value three columns over from the
>> > column
>> > it
>> > found the reference value.
>> >
>> > Your help is greatly appreciated.
>> >
>> > Worksheet 1
>> > A B C D
>> > E F
>> > 1 A Code B Code C Code A Results B Results C
>> > Results
>> > 2 T3ATRHYX T3BTRHYX T3CTRHYX 0.0909 0.1053 0.1739
>> > 3 T3ABCHYX T3BBCHYX T3CBCHYX 0.4545 0.3947 0.3478
>> > 4 T3ABCITX T3BBCITX T3CBCITX 0.3636 0.3947 0.3478
>> >
>> > Worsheet 2
>> >
>> > A B C
>> > D
>> > Code Results Input Column OutPut Column
>> > 1 T3ATRHYX 0.0909 1 4
>> >
>> >
>> >

>>
>>
>>



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookUP with multiple reference columns Biff Excel Worksheet Functions 6 December 30th 08 01:40 AM
Vlookup with multiple reference Yanky Excel Worksheet Functions 1 December 11th 08 12:55 PM
How do I vlookup multiple rows with same reference? Kathie C Excel Worksheet Functions 2 March 30th 08 07:09 PM
how do i reference multiple rows/columns with one function? NewUser13 New Users to Excel 1 March 4th 05 06:49 PM
how do i reference multiple rows/columns with one function? NewUser13 New Users to Excel 0 March 4th 05 06:45 PM


All times are GMT +1. The time now is 03:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.