ExcelBanter

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

Drew

Countif problems
 
I am currently trying to write a formula that looks up a centre eg Boston and
then, from another column, how many 'Bostons' appear between two given dates.
Is this possible?
Although I am writing this formula other people will have to use it and
change the date ranges regularly so it can't be overly complicated.
--
Drew C

Jacob Skaria

Countif problems
 
With data arranged as below try the below formula. Query dates are in cells
C1 & D1

=SUMPRODUCT((A1:A7=C1)*(A1:A7<=D1)*(B1:B7="Boston "))

Col A Col B Col C Col D
1/25/2010 Boston 1/25/2010 1/28/2010
1/26/2010 NY
1/27/2010 Boston
1/28/2010 NY
1/29/2010 Boston
1/30/2010 NY
1/31/2010 Boston



--
Jacob


"Drew" wrote:

I am currently trying to write a formula that looks up a centre eg Boston and
then, from another column, how many 'Bostons' appear between two given dates.
Is this possible?
Although I am writing this formula other people will have to use it and
change the date ranges regularly so it can't be overly complicated.
--
Drew C



All times are GMT +1. The time now is 01:57 PM.

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