ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif with dates (https://www.excelbanter.com/excel-worksheet-functions/447453-countif-dates.html)

mleeangel

Countif with dates
 
1 Attachment(s)
Trying to get a count using hired before date and termed after date. I am trying to use the cell the date is in. I'm attaching a sample spreadsheet with the formula that I'm using. Thanks for your help and showing me how to fix what I am messing up.
Thanks
Michelle

Spencer101

Quote:

Originally Posted by mleeangel (Post 1606600)
Trying to get a count using hired before date and termed after date. I am trying to use the cell the date is in. I'm attaching a sample spreadsheet with the formula that I'm using. Thanks for your help and showing me how to fix what I am messing up.
Thanks
Michelle

Try changing the formula in D2 to:

=COUNTIFS(Sheet1!B:B,B2,Sheet1!H:H,"<"&$D$1,Sheet1 !I:I,""&$D$1)

Does that fix it for you?

You may actually wish to use the below version as it will also capture any that fall on the date in D1

=COUNTIFS(Sheet1!B:B,B2,Sheet1!H:H,"<="&$D$1,Sheet 1!I:I,"="&$D$1)


And this one will allow you to drag the formula to populate the other cells:

=COUNTIFS(Sheet1!$B:$B,$B2,Sheet1!$H:$H,"<="&D$1,S heet1!$I:$I,"="&D$1)


All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com