• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Array Formula with 2 criteria

Kellis

Member
Hi all,

I have an array formula where I am looking to return only 1 reference number if the number of incidents are equal to 4. In the spreadsheet the reference can appear multiple times, I have added a column to identify the first incidence of the reference number, not sure if I need this.

The array formula works to identify the number of incidents and area but returns duplicate reference numbers.

Please help!!

Code:
=IF($B$4:$B$17="Yes",INDEX($D$4:$D$17,SMALL(IF(COUNTIF(search_states,$C$4:$C$17)*COUNTIF(search_dates,$E$4:$E$17),(ROW($E$4:$E$17)-MIN(ROW($B$4:$B$17))+1),""),ROW(A1))))
As an Array

Please see file attached
 

Attachments

  • Array find reference.xls
    32.5 KB · Views: 4
Hi,

Why not make a pivot report with criteria in filter to get unique ref. no.

EDIT: Also see the attached file for new array formula with 1st apperance formula.

Regards,
 

Attachments

  • Array find reference.xlsx
    11.8 KB · Views: 7
Last edited:
Thanks Somendra,

The array formula is great. A pivot table was not an option I had wanted on the main spreadsheet.
 
2 criteria filter to return multiple matching values without duplicate non-array formula.

In F4, formula copied down :

=IFERROR(INDEX(D$4:D$17,MATCH(1,MMULT(ISNA(MATCH(D$4:D$17,F$3:F3,0))*(C$4:C$17=search_states)*(E$4:E$17=search_dates),1),0)),"")

Regards
Bosco
 

Attachments

  • Array find reference(1).xls
    31 KB · Views: 9
Last edited:
Back
Top