Home > Mobile >  How do I count up if a student has selected Biology, Chemistry, and/or Physics
How do I count up if a student has selected Biology, Chemistry, and/or Physics

Time:10-08

I've tried Pivot tables, countif (Parse error) and the Query function, although I'm not very good with it yet. What is your suggestion?

enter image description here

The answer would return either a 1, 2 or 3 in column P

CodePudding user response:

COUNTIF with 'OR operator':

=COUNTIF(E2:G2,"Biology") COUNTIF(E2:G2,"Chemistry") COUNTIF(E2:G2,"Physics")

QUERY:

=IFNA(QUERY(TRANSPOSE(E2:G2),"select count(Col1) where Col1 matches 'Biology|Chemistry|Physics' label count(Col1) ''"),0)

CodePudding user response:

Try:

=AND(E2=="Biology";F2=="DT";G2=="Business Studies")

Edit: I am using European Excel, maybe there are some differencess in syntax. But maybe the idea could help you.

  • Related