View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Victor Victor is offline
external usenet poster
 
Posts: 39
Default 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