Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Looking for a function that performs a special kind of Vlookup


Let say you have a table with columns A, B, C, D, E, F and you want to do a
vlookup, but not the regular vlookup but one that takes into account values
in columns A and B. For instance:

A B C D E F
Day Tue 2 4 3 3
Day Wed 7 6 8 5
Day Thu 2 1 9 7

Taking the 2nd row, I want to do a vlookup based on Day and Wed instead of
just using Day. Is there a function like that or any combination of functions
that I can use to do this?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default Looking for a function that performs a special kind of Vlookup

I put your data in A1:G3
Then I inserted a new column A
In A1 I used formula =B1&C1 (giving DayTue)
Copied formula down the column
In K1 (could be anywhere) I entered the text: Day and in L1 the text: Wed
In M1 I used formula =VLOOKUP(K1&L1,A1:G3,4,FALSE) which returned value 7 as
hoped for.

Then for fun, I hid column A and all worked well

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Ayo" wrote in message
...

Let say you have a table with columns A, B, C, D, E, F and you want to do
a
vlookup, but not the regular vlookup but one that takes into account
values
in columns A and B. For instance:

A B C D E F
Day Tue 2 4 3 3
Day Wed 7 6 8 5
Day Thu 2 1 9 7

Taking the 2nd row, I want to do a vlookup based on Day and Wed instead of
just using Day. Is there a function like that or any combination of
functions
that I can use to do this?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Looking for a function that performs a special kind of Vlookup

You can use sumproduct to do something close to what you want. It is similar
to a sumif with multiple criteria. It will sum all of the records where it
finds both Day and Wed. Auuming there is only 1 unique instance then you will
get back the number similar to a Vlookup

=sumproduct(--(A2:A10="Day"), --(B2:B10="Wed"), C2:C10)

will return 7...

Here is a link to sumproduct...
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

The author of that page is Bob Phillips who regularily posts on this site.
If this post is helpful buy him a beer.
--
HTH...

Jim Thomlinson


"Ayo" wrote:


Let say you have a table with columns A, B, C, D, E, F and you want to do a
vlookup, but not the regular vlookup but one that takes into account values
in columns A and B. For instance:

A B C D E F
Day Tue 2 4 3 3
Day Wed 7 6 8 5
Day Thu 2 1 9 7

Taking the 2nd row, I want to do a vlookup based on Day and Wed instead of
just using Day. Is there a function like that or any combination of functions
that I can use to do this?


  #4   Report Post  
Posted to microsoft.public.excel.misc
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Looking for a function that performs a special kind of Vlookup

Thanks Jim. Works great.

"Jim Thomlinson" wrote:

You can use sumproduct to do something close to what you want. It is similar
to a sumif with multiple criteria. It will sum all of the records where it
finds both Day and Wed. Auuming there is only 1 unique instance then you will
get back the number similar to a Vlookup

=sumproduct(--(A2:A10="Day"), --(B2:B10="Wed"), C2:C10)

will return 7...

Here is a link to sumproduct...
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

The author of that page is Bob Phillips who regularily posts on this site.
If this post is helpful buy him a beer.
--
HTH...

Jim Thomlinson


"Ayo" wrote:


Let say you have a table with columns A, B, C, D, E, F and you want to do a
vlookup, but not the regular vlookup but one that takes into account values
in columns A and B. For instance:

A B C D E F
Day Tue 2 4 3 3
Day Wed 7 6 8 5
Day Thu 2 1 9 7

Taking the 2nd row, I want to do a vlookup based on Day and Wed instead of
just using Day. Is there a function like that or any combination of functions
that I can use to do this?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Looking for a function that performs a special kind of Vlookup

If per chance you were to want to return 7, 6, 8, 5 instead of just 7 you
could do this.

Select M, N, O, and P. While still selected type in Bernard's formula
modified like this.

=VLOOKUP(K1&L1,A1:G3,{4,5,6,7},FALSE)

Now commit with Ctrl + Shift + Enter, which is an Array Enter. Excel will
put { } around the formula and you will have 7 6 8 & 5 in the four cells.

DayThu returns 2 1 9 7 in the four cells.

If you want to modify the formula later to accomidate new data you will need
to select all four cells and make the modifications and array enter again.

HTH
Regards,
Howard

"Ayo" wrote in message
...

Let say you have a table with columns A, B, C, D, E, F and you want to do
a
vlookup, but not the regular vlookup but one that takes into account
values
in columns A and B. For instance:

A B C D E F
Day Tue 2 4 3 3
Day Wed 7 6 8 5
Day Thu 2 1 9 7

Taking the 2nd row, I want to do a vlookup based on Day and Wed instead of
just using Day. Is there a function like that or any combination of
functions
that I can use to do this?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
More vlookup questions (I think?)(kind of long) JaimeZX Excel Discussion (Misc queries) 3 February 18th 09 09:17 PM
vlookup performs inconsistently with decimals in lookup value form Oxo New Users to Excel 2 November 17th 07 06:15 PM
Kind of a reverse vlookup sam Excel Worksheet Functions 4 May 7th 07 06:19 PM
Go to Special or other function to jump to vlookup source? andy62 Excel Worksheet Functions 0 August 6th 06 06:54 PM
Some kind of vlookup required? tcpeterso Excel Discussion (Misc queries) 4 May 19th 06 03:15 AM


All times are GMT +1. The time now is 06:30 PM.

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

About Us

"It's about Microsoft Excel"