Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default How do I solve a vlookup when multiple records are available?

From an other sheet, I'm trying to look up a value in a list hoping to get a
value on the same record returned.
However, in the list where I'm looking, the basic identifier can occur
multiple times, related to a date. So, I wrote my lookup as follows:
=IF(VLOOKUP(DV14;[Functies.xls]Functionweight!$A$2:$E$225;1)=DV14;IF(VLOOKUP(DV14 ;[Functies.xls]Functionweight!$A$2:$E$225;4)=$B$5;VLOOKUP(DV14;[Functies.xls]Functionweight!$A$2:$E$225;5);"FALSE"))
In this case, DV14 contains my identifier in my "receiving" sheet. In the
"functionweight" sheet, the identifier can occur multiple times (in row 1),
so the second "IF" looks for the corresponding cell (column 4), which has to
be identical to B5 in my receiving sheet (which contains the dummy date). If
both conditions are true, I want to receive the value of column 5 back.
What happens is that when e.g. 2 records are available (one with a date in
the past, and one with the dummy date in column 4), I get an error back in
stead of the value in column 5 of the row containing the dummy date .... Does
anyone have a bright idea on how this can be solved ?

Thanks in advance,
Chris
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I solve a vlookup when multiple records are available?

Hi,

Try something like

=SUMPRODUCT(--([Functies.xls]Functionweight!$A$2:$A$225=DV14),--(DateColumn=DU14),[Functies.xls]Functionweight!$E$2:$E$225)

Where DateColumn is the date column in the lookup sheet and DU14 contains
the date you want.

If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Chris" wrote:

From an other sheet, I'm trying to look up a value in a list hoping to get a
value on the same record returned.
However, in the list where I'm looking, the basic identifier can occur
multiple times, related to a date. So, I wrote my lookup as follows:
=IF(VLOOKUP(DV14;[Functies.xls]Functionweight!$A$2:$E$225;1)=DV14;IF(VLOOKUP(DV14 ;[Functies.xls]Functionweight!$A$2:$E$225;4)=$B$5;VLOOKUP(DV14;[Functies.xls]Functionweight!$A$2:$E$225;5);"FALSE"))
In this case, DV14 contains my identifier in my "receiving" sheet. In the
"functionweight" sheet, the identifier can occur multiple times (in row 1),
so the second "IF" looks for the corresponding cell (column 4), which has to
be identical to B5 in my receiving sheet (which contains the dummy date). If
both conditions are true, I want to receive the value of column 5 back.
What happens is that when e.g. 2 records are available (one with a date in
the past, and one with the dummy date in column 4), I get an error back in
stead of the value in column 5 of the row containing the dummy date .... Does
anyone have a bright idea on how this can be solved ?

Thanks in advance,
Chris

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default How do I solve a vlookup when multiple records are available?

Hi,

Please check this link.

http://office.microsoft.com/en-us/ex...260381033.aspx

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Chris" wrote in message
...
From an other sheet, I'm trying to look up a value in a list hoping to get
a
value on the same record returned.
However, in the list where I'm looking, the basic identifier can occur
multiple times, related to a date. So, I wrote my lookup as follows:
=IF(VLOOKUP(DV14;[Functies.xls]Functionweight!$A$2:$E$225;1)=DV14;IF(VLOOKUP(DV14 ;[Functies.xls]Functionweight!$A$2:$E$225;4)=$B$5;VLOOKUP(DV14;[Functies.xls]Functionweight!$A$2:$E$225;5);"FALSE"))
In this case, DV14 contains my identifier in my "receiving" sheet. In the
"functionweight" sheet, the identifier can occur multiple times (in row
1),
so the second "IF" looks for the corresponding cell (column 4), which has
to
be identical to B5 in my receiving sheet (which contains the dummy date).
If
both conditions are true, I want to receive the value of column 5 back.
What happens is that when e.g. 2 records are available (one with a date in
the past, and one with the dummy date in column 4), I get an error back in
stead of the value in column 5 of the row containing the dummy date ....
Does
anyone have a bright idea on how this can be solved ?

Thanks in advance,
Chris


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
How do I consolidate multiple records into one? Midalia Excel Discussion (Misc queries) 2 October 31st 08 01:59 PM
Multiple records per row timg Excel Discussion (Misc queries) 4 September 21st 06 08:09 PM
return multiple records matching multiple criteria Karthik Excel Worksheet Functions 2 March 22nd 06 04:42 PM
Can VLookup function find and list multiple records? Rich - SG Excel Worksheet Functions 11 July 5th 05 07:44 PM
How can I solve for multiple unknown variables in Excel? Marion Excel Discussion (Misc queries) 1 March 6th 05 05:25 PM


All times are GMT +1. The time now is 06:16 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"