Home > Back-end >  Count how many times a value occurs in a range (based on the value in another column)
Count how many times a value occurs in a range (based on the value in another column)

Time:12-14

I'm stuck with this one. Maybe a simple one, but I'm breaking my head over it for the past two days...

I am trying to find a way to count how many times a certain word (e.g. RV) in a range (F3:J25) occurs. Only when the cell (on the same row) in column E matches the value in cell A2. The result being in B2.

Again with the word BV. And also with the other corresponding values in A3, A4 ...

Any help, or a nudge in the right direction would be very much appreciated.

enter image description here

CodePudding user response:

Use SUMPRODUCT and some Booleans:

=SUMPRODUCT(($F$3:$J$25=B$1)*($E$3:$E$25=$A2))

Put that in B2 copy over and down.

  • Related