Apr 28 2022 05:58 PM
If I use COUNTIF or COUNTIFS on one column, it returns 17 (correctly).
But when I try to add the second column in COUNTIFS, it returns 0 (very incorrectly).
Am I messing up the syntax?
=COUNTIFS(B:B, "R", H:H, "R")
Thanks,
Tony
Apr 28 2022 09:00 PM
COUNTIFS returns the count of items that match ALL criteria. Thus, the number of cells that contain "R" in both columns B and H (i.e. on the same row).
Try this one in stead:
=COUNTIF(B:B,"R")+COUNTIF(H:H,"R")
Apr 28 2022 09:58 PM
So, a +1 only occurs when the "R" exists for both Columns B and H, on each row?
That is so weird... but makes sense why a 0 was returned, as the data sets are not on the same rows.
Adding the COUNTIFS() together returns the expected result... but completely bypasses the entire reason I was using COUNTIFS.. might as well just add COUNTIF() statements! :p
Regardless, you helped me with the solution I was needing. I really appreciate it.
Best,
Tony