# Summarize two columns

✭✭✭✭

I'm trying to count the # of instances based on criteria from two columns. I must be missing something from my formula. I'm trying to count the total how many times "SRC" objectives there are that do not have a status of Blue. So, I want it to count statuses with "Red, Green, and yellow" where the business vertical column contains "SRC" in the same row.

=COUNTIF([Business Vertical]11:[Business Vertical]80, HAS(@cell, "SRC") + COUNTIF(Status11:Status90, NOT(@cell, "blue")))

Tags:

• ✭✭✭✭✭✭

2 Things:

1. When entering multiple criteria you need to use COUNTIFS
2. In your formula the status range was a different size then the Business Vertical range.

See below corrected formula:

=COUNTIFS([Business Vertical]11:[Business Vertical]90, HAS(@cell, "SRC"), Status11:Status90, NOT(@cell = "Blue"))

• ✭✭✭✭✭✭

Your ranges should be the same size. The [Business Vertical] range goes to row 80, but the Status range goes to row 90.

• ✭✭✭✭✭✭

2 Things:

1. When entering multiple criteria you need to use COUNTIFS
2. In your formula the status range was a different size then the Business Vertical range.

See below corrected formula:

=COUNTIFS([Business Vertical]11:[Business Vertical]90, HAS(@cell, "SRC"), Status11:Status90, NOT(@cell = "Blue"))

• ✭✭✭✭✭✭

I completely misread the original formula. While you will need the COUNTIFS as mentioned above to accomplish what you are wanting to do, the problem with the original formula is the parenthesis. The first COUNTIF isn't closed off before adding the second COUNTIF.

• ✭✭✭✭

Thank you both. @Leibel S the formula worked perfectly and I ensured ranges were the same. Thanks @Paul Newcome

• ✭✭✭✭✭✭

Happy to help. 👍️