Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup returning one more than expected
Hi,
I am using a formula to return multiple values relating to a single value ie Sheet5 CA CB 001 John, Smit 001 Jane Seymore 001 John 002 Chris Workings sheet returns: 001 John, Smit 001 Jane Seymore 001 John 002 Chris - - The problem I get is that one extra value ie Chris being returned even though Chris does not fall in the criteria(001). =IF(ISERROR(INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Shee t5!$A$2:$A$185=Workings!$B$6,ROW(Sheet5!$A$2:$A$18 5)),ROW(1:1)),2)),"-",INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Sheet5!$A$2:$A $185=Workings!$B$6,ROW(Sheet5!$A$2:$A$185)),ROW(1: 1)),2)) Please let me know if there is something I can do |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup returning one more than expected
Try this (array entered):
=IF(ROWS($1:1)<=COUNTIF(Sheet5!$A$2:$A$185,Working s!$B$6),INDEX(Sheet5!$B$2:$B$185,SMALL(IF(Sheet5!$ A$2:$A$185=Workings!$B$6,ROW(A$2:A$185)-ROW(A$2)+1),ROWS($1:1))),"-") Biff "Victor" wrote in message ... Hi, I am using a formula to return multiple values relating to a single value ie Sheet5 CA CB 001 John, Smit 001 Jane Seymore 001 John 002 Chris Workings sheet returns: 001 John, Smit 001 Jane Seymore 001 John 002 Chris - - The problem I get is that one extra value ie Chris being returned even though Chris does not fall in the criteria(001). =IF(ISERROR(INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Shee t5!$A$2:$A$185=Workings!$B$6,ROW(Sheet5!$A$2:$A$18 5)),ROW(1:1)),2)),"-",INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Sheet5!$A$2:$A $185=Workings!$B$6,ROW(Sheet5!$A$2:$A$185)),ROW(1: 1)),2)) Please let me know if there is something I can do |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup returning one more than expected
Thanks Biff
Works 100%! "Biff" wrote: Try this (array entered): =IF(ROWS($1:1)<=COUNTIF(Sheet5!$A$2:$A$185,Working s!$B$6),INDEX(Sheet5!$B$2:$B$185,SMALL(IF(Sheet5!$ A$2:$A$185=Workings!$B$6,ROW(A$2:A$185)-ROW(A$2)+1),ROWS($1:1))),"-") Biff "Victor" wrote in message ... Hi, I am using a formula to return multiple values relating to a single value ie Sheet5 CA CB 001 John, Smit 001 Jane Seymore 001 John 002 Chris Workings sheet returns: 001 John, Smit 001 Jane Seymore 001 John 002 Chris - - The problem I get is that one extra value ie Chris being returned even though Chris does not fall in the criteria(001). =IF(ISERROR(INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Shee t5!$A$2:$A$185=Workings!$B$6,ROW(Sheet5!$A$2:$A$18 5)),ROW(1:1)),2)),"-",INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Sheet5!$A$2:$A $185=Workings!$B$6,ROW(Sheet5!$A$2:$A$185)),ROW(1: 1)),2)) Please let me know if there is something I can do |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lookup returning one more than expected
You're welcome. Thanks for the feedback!
Biff "Victor" wrote in message ... Thanks Biff Works 100%! "Biff" wrote: Try this (array entered): =IF(ROWS($1:1)<=COUNTIF(Sheet5!$A$2:$A$185,Working s!$B$6),INDEX(Sheet5!$B$2:$B$185,SMALL(IF(Sheet5!$ A$2:$A$185=Workings!$B$6,ROW(A$2:A$185)-ROW(A$2)+1),ROWS($1:1))),"-") Biff "Victor" wrote in message ... Hi, I am using a formula to return multiple values relating to a single value ie Sheet5 CA CB 001 John, Smit 001 Jane Seymore 001 John 002 Chris Workings sheet returns: 001 John, Smit 001 Jane Seymore 001 John 002 Chris - - The problem I get is that one extra value ie Chris being returned even though Chris does not fall in the criteria(001). =IF(ISERROR(INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Shee t5!$A$2:$A$185=Workings!$B$6,ROW(Sheet5!$A$2:$A$18 5)),ROW(1:1)),2)),"-",INDEX(Sheet5!$A$2:$B$185,SMALL(IF(Sheet5!$A$2:$A $185=Workings!$B$6,ROW(Sheet5!$A$2:$A$185)),ROW(1: 1)),2)) Please let me know if there is something I can do |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LOOKUP function not returning expected value - Using vector_lookup format | Excel Worksheet Functions | |||
Excel 2002 Lookup formula returning wrong results? | Excel Worksheet Functions | |||
LOOKUP returning value in cell above what I was searching for | Excel Discussion (Misc queries) | |||
Returning expected dates | Excel Worksheet Functions | |||
Lookup function returning reference, not value | Excel Worksheet Functions |