Ryan M.
Ryan M.

Reputation: 15

How to use "COUNTIF" function to count one instance of something per row

I have a question I'm hoping someone in the community may be able to help me answer.

Here's my issue, I'm trying to use the COUNTIF function to determine how many times a particular value appears. Easy enough right? Here's the tricky part, I want to only count certain values from each row. Only retaining the count for a particular value from each row. Per row there should only be a max of (1) error type counted. Screenshot below for more context.

Example

enter image description here

Upvotes: 0

Views: 962

Answers (1)

Forward Ed
Forward Ed

Reputation: 9894

Insert a helper column to track the highest priority error. In your helper column use the following formula and copy down as required. If you prefer a blank over the word none when no errors are found, change "None" to "".

=IFERROR("P"&AGGREGATE(15,6,RIGHT(E2:J2,1)/(E2:J2<>""),1),"None")

In my example below I place the helper column in column D, but it can be any column.

POC

In D16:E16 I used the following formula and copied right

=COUNTIF($D$4:$D$13,E$15)

Upvotes: 0

Related Questions