
Originally Posted by
Arnifix
The Match +1 bit simply allows for me to have a header row. Without the +1 all the row numbers for matching values are out by one and it makes it harder to find the value.
For the example I used above, remember that Row 1 contains B D F & H while Row 2 is the first to actually contain a value.
I'm afraid to me at least the above does not clear the confusion.
You suggested a formula for F2 of:
=IF(ISERROR(MATCH(D2,List1,0)), "No","Yes (" & MATCH(D2,List1,0)+1 & ")")
Given the sequential "1 to n" listing in List1 it follows that:
-- if List1 excludes header row then there would be no need to adjust the returned value at all.
-- if List1 includes header row then you would in fact need to subtract rather than add 1 from the MATCH result.
That is the confusion on my part regards existing formulae.
In relation to your actual question - assuming the values in List1 are unique (unknown):
... to avoid unnecessary calculations
I2:
=COUNTIF(F:F,"YES*")
...to return unique results
H2:
=IF(ROWS(H$2:H2)>$I$2,"",SMALL(IF(ISNUMBER(MATCH(List1,$D$2:$D$10000,0)),List1),ROWS(H$2:H2)))
confirmed with CTRL + SHIFT + ENTER
copied down as far as deemed necessary
NOTE the need for CTRL + SHIFT + ENTER for the unique listing formula - ie this is an Array formula - confirming with Enter alone will not suffice.
Bookmarks