Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
I am using vlookup to return the "Sales" for a particular "Location" depending on the Yr. My result is always the sales for the first year, which I assumed is what would happen. Is there any way around this? Location Yr Sales 12345 2008 100,000 12345 2007 150,000 12345 2006 125,000 Thanks for the help. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Assuming your original lookup range is columns A through C, insert a new column between Yr column and Sales column. You Sales column would be pushed to column D. In the new column C, starting from cell C2, use the formula =A2&B2 and copy the formula down however far is necessary. Now your new lookup range will be columns C and D. If your lookup value contains the combination of Location and Yr, it should return the correct Sales value. -- -Simon "JRJ" wrote: Hello, I am using vlookup to return the "Sales" for a particular "Location" depending on the Yr. My result is always the sales for the first year, which I assumed is what would happen. Is there any way around this? Location Yr Sales 12345 2008 100,000 12345 2007 150,000 12345 2006 125,000 Thanks for the help. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=SUMIF(A1:C3,12345,C1:C3)
A B C 1 12345 2008 100,000 2 12345 2007 150,000 3 12345 2006 125,000 "JRJ" wrote: Hello, I am using vlookup to return the "Sales" for a particular "Location" depending on the Yr. My result is always the sales for the first year, which I assumed is what would happen. Is there any way around this? Location Yr Sales 12345 2008 100,000 12345 2007 150,000 12345 2006 125,000 Thanks for the help. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
JRJ --
As I understand it, you want to find (for example) the sales in location 12345 for year 2007. If so, here's an approach: =SUMPRODUCT(--(A1:A5=12345),--(B1:B5=2007),C1:C5) Should do the trick. HTH "JRJ" wrote: Hello, I am using vlookup to return the "Sales" for a particular "Location" depending on the Yr. My result is always the sales for the first year, which I assumed is what would happen. Is there any way around this? Location Yr Sales 12345 2008 100,000 12345 2007 150,000 12345 2006 125,000 Thanks for the help. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
All great suggestions....thanks everyone!
"JRJ" wrote: Hello, I am using vlookup to return the "Sales" for a particular "Location" depending on the Yr. My result is always the sales for the first year, which I assumed is what would happen. Is there any way around this? Location Yr Sales 12345 2008 100,000 12345 2007 150,000 12345 2006 125,000 Thanks for the help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) | New Users to Excel | |||
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( | Excel Worksheet Functions | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |