COUNTIF - Two Variables

ajay_gajree

Well-known Member
Joined
Jul 16, 2011
Messages
518
Hi

=SUM(($A$6:$A$98="EQUITY OPS")*($B$6:$C$98=1))

I am using the above formula to return the number of times "Equity Ops" and "1" are in the same row.

This is return zero even when I have the corresponding data in the rows,

I am using Ctrl, Shift, Enter to put {} arounf the formula, still no luck,

Can anyone help?

Best regards

Ajay
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Ajay

A couple of things that could be going wrong with your existing formula:

1. Are you certain that there are not stray spaces before or after any of the values?
eg If cell A8 appears to contain "EQUITY OPS" does =LEN(A8) in a vacant cell return 10?
Similar for the 1 values giving a LEN of 1?

2. Are you certain the 1 values are numbers, not text.
eg if cell B8 appears to contain a 1, does =ISNUMBER(B8) in a vacant cell return TRUE?

What version of Excel are you using?
 
Upvote 0
Hi,

Thank you all for your answers, my numbers were indeed text, so I have now managed to resolve this thanks to you guys!

Best regards
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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