Home > other >  How to get rid of the array size error in this scenario while using Countifs()
How to get rid of the array size error in this scenario while using Countifs()

Time:11-09

I have two columns and am trying to count the nonblank cells in column B based on a specific corresponding value in column A. So I am using COUNTIFS($A$3:$A,"GA",len(trim($B7:$B)),">0") to calculate that.

First criteria range is Column A and the criteria is if cell value equals "GA".

I want the second criteria range to be Column B and the criteria to be len(trim(cell)) > 0 but obviously I am not specifying it correctly and getting the following error, instead of the expected result of 7.

Please help in how I should achieve this.

enter image description here

CodePudding user response:

Typo? Should be...

=COUNTIFS($A$3:$A,"GA",len(trim($B3:$B)),">0")

(You had $B7:$B.)

You can shorten this anyway:

=COUNTIFS(A3:A,"GA",B3:B,"<>")

  • Related