Count Function 2 Criteria

Tucker2008

New Member
Joined
Aug 19, 2013
Messages
37
Office Version
  1. 2013
Platform
  1. Windows
I need to match a criteria in one column of data and count the results from a different column in the table.

So I want to reference a Cell A2 on Sheet1....if cell A2 is "4/1/2015"

I want a formula that does the following

Reference Cell A2, Against the Table Below, and Return a Count of 3.

There are 4 instances of "4/1/2015" but only 3 have Values in them. they are all different and I want to count them.



DATA1, Sheet 2

COL A
COL B
4/1/2015
4/1/2015
CAT
4/1/2015PEN
4/1/2015DOG

<tbody>
</tbody>

Result: 4/1/2015 = 3

<tbody>
</tbody>
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
The <> is does not equal.

The & I use as <> is a bit funny in some functions. By typing "<>"&"" you are basically Concatenating the two. Where "<>""" or <>"" doesn't always work.
 
Upvote 0
=COUNTIFS(Sheet2!A:A,A2,Sheet2!B:B,"?*")

since you seem to have text (no numbers) in column B.<!-- edit note -->
 
Upvote 0
The <> is does not equal.

The & I use as <> is a bit funny in some functions. By typing "<>"&"" you are basically Concatenating the two. Where "<>""" or <>"" doesn't always work.

The idiom is just "<>"...

=COUNTIFS(Sheet2!A:A,A2,Sheet2!B:B,"<>")

This excludes only empty, unused cells. This means it picks out values like FALSE, #N/A, a formula blank (i.e. ""), text, and numbers.
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,895
Members
449,477
Latest member
panjongshing

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