I'm not even sure this is possible, but here is what I have:
Sheet1
I have a COUNTIFS formula
And it's counting the number of times 101-103 shows up, but what I'm trying to do is if any of those show up, only count the 1st one that shows up in that row and move on, to give me the result of 1.
For instance Row 1, Teacher Name 1 has 101 in column C so it should only count 1 time, but my result is 4 because it's adding all of them.
Sheet1
A | B | C | D | E | F | |
---|---|---|---|---|---|---|
Name | Class | Code | Code 1 | Code 2 | Code 3 | |
1 | Teacher Name 1 | His | 101 | 102 | 101 | 103 |
2 | Teacher Name 2 | Art | 100 | 102 | 100 | 103 |
3 | Teacher Name 3 | Eng | 202 | 100 | 101 | 108 |
I have a COUNTIFS formula
Excel Formula:
=SUM(COUNTIFS(Sheet1!B:B,{"His";"Art";"Eng"},Sheet1!C:C,{"101";"102";"103"})+COUNTIFS(Sheet1!B:B,{"His";"Art";"Eng"},Sheet1!D:D,{"101";"102";"103"})+COUNTIFS(Sheet1!B:B,{"His";"Art";"Eng"},Sheet1!E:E,{"101";"102";"103"})+COUNTIFS(Sheet1!B:B,{"His";"Art";"Eng"},Sheet1!F:F,{"101";"102";"103"})
And it's counting the number of times 101-103 shows up, but what I'm trying to do is if any of those show up, only count the 1st one that shows up in that row and move on, to give me the result of 1.
For instance Row 1, Teacher Name 1 has 101 in column C so it should only count 1 time, but my result is 4 because it's adding all of them.