PC Review


Reply
Thread Tools Rate Thread

count text with * wildcard and date range

 
 
Hanna L
Guest
Posts: n/a
 
      28th Apr 2010
Hi,
I would like to count the number of times a character string occurs in a URL
in a certain date range. Say I'm looking for all the URLs that came from
livejournal.com from the day of 2/15.

A B
Sarah.livejournal.com/123 2/15
georgeB.blogspot.com/George 2/15
happy.typepad.com/blah 2/15
male.livejournal.com/male 2/15
blogger/12345678 2/20
bobtheman.livejournal.com/#bob 2/20

I have tried the SUMPRODUCT function, but it doesn't seem to be able to deal
with the either the wildcard or the date in column B.

SUMPRODUCT ((A1:A5 = "*livejournal*" ),(B1:B5 = "2/15" ))

This usually gives me a result of 0, even though it should be 2.

I have tried fiddling with the comma or multiplier between the two arrays.

Does anyone have any other ideas?

Thank you!

 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      28th Apr 2010
Use cells to hold the criteria.

D2 = livejournal.com
E2 = 2/15/2010

This will work in any modern version of Excel:

=SUMPRODUCT(--(ISNUMBER(SEARCH(D2,A2:A7))),--(B2:B7=E2))

This will work in Excel 2007 and later:

=COUNTIFS(A2:A7,"*"&D2&"*",B2:B7,E2)

--
Biff
Microsoft Excel MVP


"Hanna L" <Hanna (E-Mail Removed)> wrote in message
news:8958CE09-D498-41BD-A838-(E-Mail Removed)...
> Hi,
> I would like to count the number of times a character string occurs in a
> URL
> in a certain date range. Say I'm looking for all the URLs that came from
> livejournal.com from the day of 2/15.
>
> A B
> Sarah.livejournal.com/123 2/15
> georgeB.blogspot.com/George 2/15
> happy.typepad.com/blah 2/15
> male.livejournal.com/male 2/15
> blogger/12345678 2/20
> bobtheman.livejournal.com/#bob 2/20
>
> I have tried the SUMPRODUCT function, but it doesn't seem to be able to
> deal
> with the either the wildcard or the date in column B.
>
> SUMPRODUCT ((A1:A5 = "*livejournal*" ),(B1:B5 = "2/15" ))
>
> This usually gives me a result of 0, even though it should be 2.
>
> I have tried fiddling with the comma or multiplier between the two arrays.
>
> Does anyone have any other ideas?
>
> Thank you!
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: COUNT or COUNTIF using wildcard text? Roger Govier Microsoft Excel Worksheet Functions 1 12th Jan 2007 11:12 PM
Re: COUNT or COUNTIF using wildcard text? T. Valko Microsoft Excel Worksheet Functions 0 12th Jan 2007 11:04 PM
Re: COUNT or COUNTIF using wildcard text? T. Valko Microsoft Excel Worksheet Functions 2 12th Jan 2007 09:09 PM
How do Count a the number of times a date range appears within a date range!? leelondon Microsoft Excel Discussion 5 4th Oct 2006 12:12 PM
Count text values in a date range =?Utf-8?B?SmFuZXQgQk4=?= Microsoft Excel Misc 2 19th Jun 2006 04:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:35 PM.