# COUNTIFS WITH DATE RANGES

#### ShaunF

##### Board Regular
Hi,

Am having a brain fade. Am after a formula which returns the number (ie. count) of dates which are greater than a variable date , and where a unique identifier is met.

For example:

SHEET 1
A B
1
APPLE 10/10/2019
2 PEAR 10/05/2020
3 ORANGE 10/12/2019

SHEET 2
A B
1
APPLE 2/04/2020
2 APPLE 11/12/2019
3 PEAR 18/06/2020
4 PEAR 6/02/2020
5 PEAR 27/11/2019
6 PEAR 11/12/2019
7 ORANGE 1/10/2019
8 ORANGE 31/10/2019
9 ORANGE 9/01/2020
10 ORANGE 10/12/2019

I want to count the number of times a date shows in Sheet 2, which is greater or equal to the date in Sheet 1, where the fruit type matches. In this example, the return would be Apple - 2 ; Pear - 1 ; Orange - 3

In my sheets I have dates formatted as 'dates'.

Any help appreciated.

Thanks,

Shaun.

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

#### mrshl9898

##### Well-known Member
Like this?

=COUNTIFS(Sheet2!A:A,A1,Sheet2!B:B,">"&B1)

#### ShaunF

##### Board Regular
Perfect. Thank you for the prompt response.

Replies
5
Views
158
Replies
1
Views
108
Replies
7
Views
104
Replies
7
Views
246
Replies
4
Views
85

1,186,164
Messages
5,956,313
Members
438,246
Latest member
Deelea

### 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.

### Which adblocker are you using?

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

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