# Google Sheet formula, need answer fast: countif (or countifs) on a sheet, multiple ranges but same criteria

**URL:** <https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189>\
**Category:** Factual Questions\
**Created:** [December 8, 2022, 4:36am UTC](https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189 "2022-12-08T04:36:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bullitt](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bullitt/32/5725_2.png) [@Bullitt](https://boards.straightdope.com/u/Bullitt)\
**Post date:** [December 8, 2022, 4:36am UTC](https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189/1 "2022-12-08T04:36:05Z")

</div>

Hi, I’ve tried searching for this but can’t seem to find the answer.

In one cell I want to count the number of cells containing “A” but there are two separate ranges to look for those As. What’s the formula for this?

I tried this but no joy – =countifs(A1:V11,“A”,A12:T58,“A”)

I get #REF! **Error** Circular dependency detected. To resolve with iterative calculation, see File \> Settings.

But that’s not helping me.

I’m working it and if I solve it I’ll circle back here. Thanks!

---

<div class="post-metadata">

**Author:** ![Bullitt](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bullitt/32/5725_2.png) [@Bullitt](https://boards.straightdope.com/u/Bullitt)\
**Post date:** [December 8, 2022, 4:39am UTC](https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189/2 "2022-12-08T04:39:17Z")

</div>

I found one problem and my new formula is now this:

=countifs(A1:V11,“A”,A12:Q24,“A”,A25:T58,“A”)

I now get #VALUE! **Error** Array arguments to COUNTIFS are of different size.

---

<div class="post-metadata">

**Author:** ![penultima\_thule](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/penultima_thule/32/3833_2.png) [@penultima\_thule](https://boards.straightdope.com/u/penultima_thule)\
**Post date:** [December 8, 2022, 4:42am UTC](https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189/3 "2022-12-08T04:42:40Z")

</div>

I’d spilt the references/ranges.  
ie =countif(A1:A11,“A”)+countif(T12:T58,“A”)

---

<div class="post-metadata">

**Author:** ![Bullitt](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bullitt/32/5725_2.png) [@Bullitt](https://boards.straightdope.com/u/Bullitt)\
**Post date:** [December 8, 2022, 4:44am UTC](https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189/4 "2022-12-08T04:44:48Z")

</div>

I tried that but let me try again, since I fixed the logic error with the first attempt.

Thanks.

---

<div class="post-metadata">

**Author:** ![Bullitt](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bullitt/32/5725_2.png) [@Bullitt](https://boards.straightdope.com/u/Bullitt)\
**Post date:** [December 8, 2022, 4:46am UTC](https://boards.straightdope.com/t/google-sheet-formula-need-answer-fast-countif-or-countifs-on-a-sheet-multiple-ranges-but-same-criteria/976189/5 "2022-12-08T04:46:06Z")

</div>

That worked! Thanks, @penultima_thule !

Here’s the final formula:

=countif(A1:V11,“A”)+countif(A12:S24,“A”)+countif(A25:S58,“A”)
