Forum Discussion

mrssimmons's avatar
mrssimmons
Copper Contributor
Dec 30, 2022
Solved

Use Excel to perform my data interpration

Hi,

I have been performing this Data Interpretation on my own and I would like to use Excel to automatically perform this data analysis for me if possible: There are 8 possible scenarios and 4 different interpretation results. Here is the logic, the Interpretation is:

COVID-19 Positive if any 2, or all three of  S, N or O are Pres (Present) regardless of MS2 result.

Indeterminate if any 1 of  S, N or O are Pres AND MS2 is Pres.

Invalid if 1 or none of S, N or O are Pres AND MS2 is Abs (Absent).

Negative if  all three of  S, N or O are Abs AND MS2 is Pres.

 

I have charted every possible combination there could be and there are 16.

 

 

IDSNOMS2 Interpretation
1AbsAbsAbsAbs Invalid
2PresAbsAbsAbs Invalid
3PresAbsAbsPres Indeterminate
4PresPresAbsAbs COVID-19 Pos
5PresPresAbsPres COVID-19 Pos
6PresPresPresAbs COVID-19 Pos
7PresPresPresPres COVID-19 Pos
8AbsPresAbsAbs Invalid
9AbsPresAbsPres Indeterminate
10AbsPresPresAbs COVID-19 Pos
11AbsPresPresPres COVID-19 Pos
12AbsAbsPresAbs Invalid
13AbsAbsPresPres Indeterminate
14PresAbsPresAbs COVID-19 Pos
15PresAbsPresPres COVID-19 Pos
16AbsAbsAbsPres Negative

 

What would be the SIMPLEST way to have the interpretation auto populate? Ideally I would like to use a formula if possible rather than doing Pivot tables.

 

  • mrssimmons 

    =IF(AND(COUNTIF(B2:D2,"Abs")=3,E2="Pres"),"Negative",IF(AND(COUNTIF(B2:D2,"Pres")<=1,E2="Abs"),"Invalid",IF(COUNTIF(B2:D2,"Pres")>=2,"COVID-19 Pos",IF(AND(COUNTIF(B2:D2,"Pres")=1,E2="Pres"),"Indeterminate",""))))

     

    You can try a nested IF formula.

  • mrssimmons 

    In row 2:

    =LET(n,COUNTIF(B2:D2,"Pres"),IFS(n>=2,"COVID-19 Positive",E2="Abs","Invalid",n=1,"Indeterminate",n=0,"Negative"))
    • mrssimmons's avatar
      mrssimmons
      Copper Contributor
      Thank you so much for this formula it worked! i was so amazed. How do you learn how to make them? I would love to learn. Thank you.
  • mrssimmons 

    =IF(AND(COUNTIF(B2:D2,"Abs")=3,E2="Pres"),"Negative",IF(AND(COUNTIF(B2:D2,"Pres")<=1,E2="Abs"),"Invalid",IF(COUNTIF(B2:D2,"Pres")>=2,"COVID-19 Pos",IF(AND(COUNTIF(B2:D2,"Pres")=1,E2="Pres"),"Indeterminate",""))))

     

    You can try a nested IF formula.

    • mrssimmons's avatar
      mrssimmons
      Copper Contributor
      Thank you so much for this nested if formula it worked beautifully!

Resources