COUNTIF multiple criteria using dates?

hissonrr

Board Regular
Joined
Feb 6, 2016
Messages
106
Good day all,

In short I am trying to get a number using the COUNTIF function that has two criteria, the first being simple text in a column, but the second being that is is between two dates in another column and the same row.

To make it easier i will make a quick table...

So basically how would I write a formula that counts the number of rows where RH (in column D) is between 1/1/2018 and 1/1/2019 in column A?

In this example the formula would yield 2 because there are two rows where RH in column D falls between 1/1/2018 and 1/1/2019 in column A...


Any help would be appreciated as i am not very good with dates in formulas.

-R


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]3/4/2018[/TD]
[TD]null[/TD]
[TD]1[/TD]
[TD]RH[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]5/2/2018[/TD]
[TD]null[/TD]
[TD]2[/TD]
[TD]RH[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]6/2/2017[/TD]
[TD]null[/TD]
[TD]3[/TD]
[TD]SM[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10/10/2018[/TD]
[TD]null[/TD]
[TD]4[/TD]
[TD]SM[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]1/2/2017[/TD]
[TD]act[/TD]
[TD]5[/TD]
[TD]RH[/TD]
[/TR]
</tbody>[/TABLE]
 

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.
Try:
Code:
=COUNTIFS(D1:D5,"RH",A1:A5,">=1/1/2018",A1:A5,"<1/1/2019")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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