Countifs Question

Pezgordo

Board Regular
Joined
Jan 28, 2011
Messages
61
I am trying to determine that if a number in column DG is > than the number in column IE, what are the number of O's and/or U's in column JD? O and U are the letters being used in column JD. I tried the following formulas but keep getting an error:

=countifs(dg7:dg2870>ie7:ie2870,jd7:jd2870,"o")

=countifs(dg7:dg2870,">",ie7:ie2870,jd7:jd2870,"o")
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I am trying to determine that if a number in column DG is > than the number in column IE, what are the number of O's and/or U's in column JD? O and U are the letters being used in column JD. I tried the following formulas but keep getting an error:

=countifs(dg7:dg2870>ie7:ie2870,jd7:jd2870,"o")

=countifs(dg7:dg2870,">",ie7:ie2870,jd7:jd2870,"o")

Try one of...

Code:
=SUMPRODUCT(
    --ISNUMBER(DG7:DG2870),
    --(DG7:DG2870 > IE7:IE2870),
    --(JD7:JD2870="o"))

Code:
=SUMPRODUCT(
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--ISNUMBER(MATCH(JD7:JD2870,{"o","u"},0)))
 
Upvote 0
Code:

=SUMPRODUCT(
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--(JD7:JD2870="o"))

This one worked perfectly. Thank you.

How would I add column F (which has letters H and A in the column) to the beginning of the formula?
 
Upvote 0
Try:

=SUMPRODUCT(--ISNUMBER(MATCH(F7:F2870,{"a","h"},0)),
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--ISNUMBER(MATCH(JD7:JD2870,{"o","u"},0)))
 
Upvote 0
Code:

=SUMPRODUCT(
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--(JD7:JD2870="o"))

This one worked perfectly. Thank you.

How would I add column F (which has letters H and A in the column) to the beginning of the formula?

If column F must be tested separately for H and A...

=SUMPRODUCT(
--(F7:F2870="H"),
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--(JD7:JD2870="o"))

If both for H and A together in an OR structure...

=SUMPRODUCT(
--ISNUMBER(MATCH(F7:F2870,{"H","A"),0)),
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--(JD7:JD2870="o"))
 
Upvote 0
Thanks guys, they worked great.

=SUMPRODUCT(
--(F7:F2870="H"),
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--(JD7:JD2870="o"))

This one worked well for what I was trying to do.
 
Upvote 0
Thanks guys, they worked great.

=SUMPRODUCT(
--(F7:F2870="H"),
--ISNUMBER(DG7:DG2870),
--(DG7:DG2870 > IE7:IE2870),
--(JD7:JD2870="o"))

This one worked well for what I was trying to do.

You are welcome. Thanks for providing us feedback.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,712
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top