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.
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,619
Office Version
  1. 2007
Platform
  1. Windows
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,127,771
Messages
5,626,785
Members
416,202
Latest member
donya ba

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
Top