Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default vlookup & multiple values for one customer

I'm using VLOOKUP to combine data from 2 years. I want to organize data
across columns, but problems arise when a customer has more than one entry
per year.

Here's what the raw data looks like before using the formula (the dashes
here just separate columns):

2006 -- ID 350 -- NY -- $45
2006 -- ID 350 -- MA -- $100
2007 -- ID 350 -- NY -- $30
2007 -- ID 350 -- MA -- $550

If the formula worked perfectly, it would display:

2006 -- ID 350 -- NY -- $45 -- $30
2006 -- ID 350 -- MA -- $100 -- $550

But instead, it just puts the first 2007 value ($30) in both customer lines:

2006 -- ID 350 -- NY -- $45 -- $30
2006 -- ID 350 -- MA -- $100 -- $30

Here's the formula that I'm using currently, any ideas?

=IF(ISERROR(VLOOKUP($A3,$A$1637:$BN$3465,$J$1,FALS E)),"0",VLOOKUP($A3,$A$1637:$CD$3465,$J$1,FALSE))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default vlookup & multiple values for one customer

Sort descending on year so that 2007 values come up first in the lookup range
then add the formula agains the 2006 rows.

Also not sure what the second argument is in your formula. It should give
the column no. of the lookup value in the range.

Assuming you have lookup range in columns A to D and the value you want to
find is in column D (2007 value) then your formula in cell G1 should be

=VLOOKUP(F1,A:B,2,FALSE) where the value in F1 is the lookup cell value (ID
in your case)

"blswes" wrote:

I'm using VLOOKUP to combine data from 2 years. I want to organize data
across columns, but problems arise when a customer has more than one entry
per year.

Here's what the raw data looks like before using the formula (the dashes
here just separate columns):

2006 -- ID 350 -- NY -- $45
2006 -- ID 350 -- MA -- $100
2007 -- ID 350 -- NY -- $30
2007 -- ID 350 -- MA -- $550

If the formula worked perfectly, it would display:

2006 -- ID 350 -- NY -- $45 -- $30
2006 -- ID 350 -- MA -- $100 -- $550

But instead, it just puts the first 2007 value ($30) in both customer lines:

2006 -- ID 350 -- NY -- $45 -- $30
2006 -- ID 350 -- MA -- $100 -- $30

Here's the formula that I'm using currently, any ideas?

=IF(ISERROR(VLOOKUP($A3,$A$1637:$BN$3465,$J$1,FALS E)),"0",VLOOKUP($A3,$A$1637:$CD$3465,$J$1,FALSE))

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
vlookup on multiple values samuel Excel Worksheet Functions 3 May 7th 08 04:01 PM
vlookup - multiple values yshridhar Excel Worksheet Functions 7 August 11th 07 06:01 PM
how do i get multiple values in vlookup? pvuv Excel Worksheet Functions 3 February 1st 07 05:27 AM
Vlookup for multiple values SCHM Excel Worksheet Functions 6 June 23rd 06 09:10 PM
vlookup, multiple values, sum values into one cell?? Phillips L Excel Worksheet Functions 4 November 9th 05 12:31 AM


All times are GMT +1. The time now is 08:15 PM.

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

About Us

"It's about Microsoft Excel"