ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count text values in a date range (https://www.excelbanter.com/excel-discussion-misc-queries/89955-count-text-values-date-range.html)

Janet BN

Count text values in a date range
 
Hi,
Can someone help me - I need to count the amount of instances of a text
value within a date range. I have date columns and text columns in a table
(the data is extracted from MS-Project).

eg. I am trying to count how many times "poured slab" happened in the past
week.

I have tried several things, no luck!

Peo Sjoblom

Count text values in a date range
 
=SUMPRODUCT(--(A2:A500=TODAY()-7),--(B2:B500="poured slab"))

where A holds the dates and B text, if the text is part of a larger text
string use

=SUMPRODUCT(--(A2:A500=TODAY()-7),--(ISNUMBER(SEARCH("poured
slab",B2:B500))))


Regards,


Peo Sjoblom


"Janet BN" wrote:

Hi,
Can someone help me - I need to count the amount of instances of a text
value within a date range. I have date columns and text columns in a table
(the data is extracted from MS-Project).

eg. I am trying to count how many times "poured slab" happened in the past
week.

I have tried several things, no luck!


Janet BN

Count text values in a date range
 
Thanks for that Peo, but it is only returning a 0 value as the result and I
know for a fact there are 4 instances.

I am using this to lookup on another page, will that cause a problem. (see
my equation) Or is there a line limit for this sort of checking. I tried
both your examples and got the same result.

=SUMPRODUCT(--('Input Data'!$S2:$S8500=TODAY()-7),--('Input
Data'!D2:D8500="4,000"))

Any help appreciated.

ps.. It has taken some time to get back to this issue.


"Peo Sjoblom" wrote:

=SUMPRODUCT(--(A2:A500=TODAY()-7),--(B2:B500="poured slab"))

where A holds the dates and B text, if the text is part of a larger text
string use

=SUMPRODUCT(--(A2:A500=TODAY()-7),--(ISNUMBER(SEARCH("poured
slab",B2:B500))))


Regards,


Peo Sjoblom


"Janet BN" wrote:

Hi,
Can someone help me - I need to count the amount of instances of a text
value within a date range. I have date columns and text columns in a table
(the data is extracted from MS-Project).

eg. I am trying to count how many times "poured slab" happened in the past
week.

I have tried several things, no luck!



All times are GMT +1. The time now is 10:09 AM.

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