Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
More vlookup questions (I think?)(kind of long) | Excel Discussion (Misc queries) | |||
vlookup performs inconsistently with decimals in lookup value form | New Users to Excel | |||
Kind of a reverse vlookup | Excel Worksheet Functions | |||
Go to Special or other function to jump to vlookup source? | Excel Worksheet Functions | |||
Some kind of vlookup required? | Excel Discussion (Misc queries) |