Countif?

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
591
Office Version
  1. 365
Platform
  1. Windows
(I am simplifying the data to make explaining easier)

I have a table G60:G75. Some with data some with blanks. I then have H60:H75 all with data. I need the sum of the number of times the data in G60:G75 matches the data in H60:H75.

1 5
2 2
3 3
4
4 5

So for the above table the answer I am looking for is 2 as the 2 in G61 = H61 and the 3 in G62 = H62.

Any help will be appreciated
James
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
How about
=SUMPRODUCT(--(G60:G75=H60:H75))
 
Upvote 0
Thanks you to both. I will give it a try.
 
Upvote 0
Oops, youll need to change the references in my formula, formula i posted still refers to my test data
 
Upvote 0
One last tweek. If there are matching blank cells in column H and G I do NOT want them counted. Only cells with data in column G that matches data in column H
 
Upvote 0
Me again.

I entered =SUMPRODUCT(--($G$60:$G$74=$H$60:$H$74))*(G60:G74<>"") which I thought was correct. An error came up and then suggested changing the formula to =SUMPRODUCT(--($G$60:$G$74=$H$60:$H$74))*(G60:G74<>"") which is the same as I typed in. When I say yes I then get #VALUE . So it suggested the same as I typed and still returned an error.
 
Upvote 0
There was an extra closing bracket in there, try
=SUMPRODUCT(--(G60:G75=H60:H75)*(G60:G75<>""))
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,600
Members
452,658
Latest member
GStorm

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