Forum Discussion
COUNTIFS problem
- Nov 24, 2022
Hi Ellbeardo,
If I've understood you correctly, you have a data set like the one I've shown in the attached image (your column T is my column A, and your W is my B), in which Column A contains various values, including "Other" and "Temporary", against which, in column B, there can be various values, but you want to count only the pairs where A= either "Other" or "Temporary" and B=0 (which I have highlighted yellow in the image.)
You could do this by summing 2 COUNTIFS() calls like this:
=COUNTIFS(A1:A19,"Other",B1:B19,0)+COUNTIFS(A1:A19,"Temporary",B1:B19,0)
or like this (same thing really)
=SUM(COUNTIFS(A1:A19,"Other",B1:B19,0),COUNTIFS(A1:A19,"Temporary",B1:B19,0))
Hope that helps 🙂
Colin
Hi Ellbeardo,
If I've understood you correctly, you have a data set like the one I've shown in the attached image (your column T is my column A, and your W is my B), in which Column A contains various values, including "Other" and "Temporary", against which, in column B, there can be various values, but you want to count only the pairs where A= either "Other" or "Temporary" and B=0 (which I have highlighted yellow in the image.)
You could do this by summing 2 COUNTIFS() calls like this:
=COUNTIFS(A1:A19,"Other",B1:B19,0)+COUNTIFS(A1:A19,"Temporary",B1:B19,0)
or like this (same thing really)
=SUM(COUNTIFS(A1:A19,"Other",B1:B19,0),COUNTIFS(A1:A19,"Temporary",B1:B19,0))
Hope that helps 🙂
Colin
- EllbeardoNov 24, 2022Copper ContributorBrilliant, thanks!
I did try that first one but I think I missed the second criteria in the second COUNTIFS! Sorted now.