if-statementexcel-formula

MATCH formula with multiple conditions returning true when false


The formula below returns True ("Issue") when only the first condition is True (COUNTIF(Table1[Boss ID]) when it should return false as the other conditions in the rest of the formula are false.

Not sure if the * is working correctly in this formula and if maybe an AND function should be used.

This formula is applied on an online Excel document.

=IF(COUNTIF(Table1[Boss ID], A13)*OR(COUNTIF(Table1[Result],"Sample haemolysed."),COUNTIF(Table1[Result],"Insufficient Sample"),COUNTIF(Table1[Result],"Sample Insufficient."),COUNTIF(Table1[Result],"Sample Insufficient for FBC.")),"Issue", "No Issue")

Solution

  • I would "outsource" the results that create an issue. Then you can use this formula:

    =LET(BossID,D2,
    filterResults,FILTER(Tabelle1[Result],Tabelle1[Boss ID]=BossID),
    IF(
        SUM(--ISNUMBER(MATCH(filterResults,tblIssues[issue],0)))>0,
        "Issues","no Issue"
      )
    )
    

    enter image description here