Countifs comparing dates in same table

jdanilog

New Member
Joined
Apr 2, 2019
Messages
1
Hi everyone,
It is my first time using this service so hoping I will find the answer I need...

I got this table named TableTimeData:

OPP Number [Project: Created Date] [Site Visit - Completed Date]
0001 11/01/2018 03/15/2019
0002 12/01/2018 03/31/2019
0003 03/01/2019 03/15/2019

In another sheet called INPUT I got this cells with the following values:

G7 I7 Q7
03/01/2019 03/31/2019 20

What I need is to count all rows in table TableTimeData that has the Site Visit Completed Date (Site Visit - Completed Date) within this dates 03/01/2019 and 03/31/2019 and has been site visited (Site Visit - Completed Date) a day NOT more than 20 days after the creation (Project: Created Date).

I wrote the following formula but it seem that the last criteria (in red) has something wrong:

=COUNTIFS(TableTimeData[Site Visit - Completed Date],">="&INPUT!$G$7,TableTimeData[Site Visit - Completed Date],"<="&INPUT!$I$7,TableTimeData[Project: Created Date],">="&TableTimeData[Site Visit - Completed Date]-$Q$7)

The expected result must be 2.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Try this

=SUMAPRODUCTO((TableTimeData[Site Visit - Completed Date]>=G7)*(TableTimeData[Site Visit - Completed Date]<=I7)*(TableTimeData[Site Visit - Completed Date]-TableTimeData[Project: Created Date]>20)*1)
 
Upvote 0

Forum statistics

Threads
1,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

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