Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default vlookup returns more than one value??

A B(Date) C D(Badge #) E F G(wo #)
26-Sep-09 733 1189
27-Sep-09 902 1189
27-Sep-09 902 1151
27-Sep-09 733 1148
27-Sep-09 733 1189
28-Sep-09 852 1189

I need to know which badge #s worked on wo # 1189 on the 27th-Sep ! In this
case 902 and 733. Note that I'm using excel 2007 and my sheet has 800 000
rows.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default vlookup returns more than one value??

Hi,
do a pivot table and the sort by date, or badge #

"MAANI" wrote:

A B(Date) C D(Badge #) E F G(wo #)
26-Sep-09 733 1189
27-Sep-09 902 1189
27-Sep-09 902 1151
27-Sep-09 733 1148
27-Sep-09 733 1189
28-Sep-09 852 1189

I need to know which badge #s worked on wo # 1189 on the 27th-Sep ! In this
case 902 and 733. Note that I'm using excel 2007 and my sheet has 800 000
rows.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default vlookup returns more than one value??

Try Advanced Filter


"MAANI" wrote:

A B(Date) C D(Badge #) E F G(wo #)
26-Sep-09 733 1189
27-Sep-09 902 1189
27-Sep-09 902 1151
27-Sep-09 733 1148
27-Sep-09 733 1189
28-Sep-09 852 1189

I need to know which badge #s worked on wo # 1189 on the 27th-Sep ! In this
case 902 and 733. Note that I'm using excel 2007 and my sheet has 800 000
rows.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default vlookup returns more than one value??

One easy, dynamic formulas tinker ..

With your source data as posted in row2 down
Enquiry/input variables
In I2, eg: 27-Sep-09
In I3, eg: 1189

In J2: =IF(AND(B2=$I$2,G2=$I$3),ROW(),"")
Copy J2 down to cover the max expected extent of source data

Then in K2:
=IF(ROWS($1:1)COUNT(J:J),"",INDEX(D:D,SMALL(J:J,R OWS($1:1))))
Copy K2 down by the smallest extent large enough to cover the max expected
number of results per enquiry, say down to K20? Col K will return all the
multiple results (if any) from col D (Badge#) satisfying the input variables
in I2:I3, neatly bunched at the top

Above concept should work fine, albeit recalc performance-wise untested here
on 800k source rows (I don't have xl07). The recalc-intensive formula is col
K's, which fill extent (as advised in the construct steps above) should be
kept minimal to enhance performance. You could also manage recalc performance
via setting it to manual calc mode, then press F9 to recalc only whenever
required.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"MAANI" wrote:
A B(Date) C D(Badge #) E F G(wo #)
26-Sep-09 733 1189
27-Sep-09 902 1189
27-Sep-09 902 1151
27-Sep-09 733 1148
27-Sep-09 733 1189
28-Sep-09 852 1189

I need to know which badge #s worked on wo # 1189 on the 27th-Sep ! In this
case 902 and 733. Note that I'm using excel 2007 and my sheet has 800 000
rows.


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 returns #n/a Michael Dieckmann Excel Worksheet Functions 2 July 2nd 08 08:56 AM
VLOOKUP Returns a zero value Nate Excel Discussion (Misc queries) 2 April 15th 08 08:45 PM
VLOOKUP returns #REF!? Cam Excel Discussion (Misc queries) 1 April 15th 08 05:34 AM
Vlookup returns a zero? Richard Excel Discussion (Misc queries) 3 June 21st 06 09:49 PM
vlookup returns 0.00 steve alcock Links and Linking in Excel 4 May 6th 05 12:47 AM


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