Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: Swindon
Posts: 1
Default Returning a selection of results using a lookup

I'm trying to find away to return a reference number using a lookup.

I have 2 work sheets one where the info is stored and the other which will be used to show the reference numbers.

The main sheet (list) works out the difference between 2 dates (in theory showing reference numbers of items out of date) and returns the number of days.

I want to be able to lookup the reference numbers of all out of date items and have them shown in one list on the second sheet (MI).

At the moment i've been able to get it to return references based on 1 day out of date. I need it to be all out of date items.

any one have any ideas. I've attached the file i've been working on

here is the array i've been using, this was given to me play with.

=IF(ROWS($1:1)<=COUNTIF(List!$C$5:$C$100,$B$11),IN DEX(List!$D$5:$D$100,SMALL(IF(List!$C$5:$C$100=$B $11,ROW(List!$C$5:$C$100)-MIN(ROW(List!$C$5:$C$100))+1),ROWS($1:1))),"")

Thank you

James
Attached Files
File Type: zip sheet.zip (47.2 KB, 126 views)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Returning a selection of results using a lookup

What's in B11?

The COUNTIF function is using a comparison of =B11 but the inner IF is using
a compariosn of =B11. They need to be the same.

Try this slighly re-arranged version. I've made the comparison to B11 to be
= in both locations.


=IF(ROWS(A$1:A1)<=COUNTIF(List!$C$5:$C$100,"="&$B $11),INDEX(List!$D$5:$D$100,SMALL(IF(List!$C$5:$C$ 100=$B$11,ROW(List!$C$5:$C$100)),ROWS(A$1:A1))-MIN(ROW(List!$C$5:$C$100))+1),"")

Also, don't forget to array enter. Array formulas need to be entered using
the key combination of CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"James Boulter" wrote in message
...

I'm trying to find away to return a reference number using a lookup.

I have 2 work sheets one where the info is stored and the other which
will be used to show the reference numbers.

The main sheet (list) works out the difference between 2 dates (in
theory showing reference numbers of items out of date) and returns the
number of days.

I want to be able to lookup the reference numbers of all out of date
items and have them shown in one list on the second sheet (MI).

At the moment i've been able to get it to return references based on 1
day out of date. I need it to be all out of date items.

any one have any ideas. I've attached the file i've been working on

here is the array i've been using, this was given to me play with.

=IF(ROWS($1:1)<=COUNTIF(List!$C$5:$C$100,$B$11),IN DEX(List!$D$5:$D$100,SMALL(IF(List!$C$5:$C$100=$B $11,ROW(List!$C$5:$C$100)-MIN(ROW(List!$C$5:$C$100))+1),ROWS($1:1))),"")

Thank you

James


+-------------------------------------------------------------------+
|Filename: sheet.zip |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=122|
+-------------------------------------------------------------------+



--
James Boulter



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 not returning results Chris Kellock Excel Worksheet Functions 14 March 19th 08 08:30 AM
Lookup Returning Multiple Results joe1182 Excel Discussion (Misc queries) 5 February 1st 06 12:02 PM
Vlookup Returning Same Results on Each Row tlatta Excel Discussion (Misc queries) 0 December 14th 05 07:34 PM
Vlookup Returning Same Results on Each Row Kleev Excel Discussion (Misc queries) 0 December 14th 05 07:33 PM
Excel 2002 Lookup formula returning wrong results? Val Excel Worksheet Functions 1 November 18th 05 09:07 PM


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