Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Count dates -in text format- in October

Hi everyone,

I have column filled with dates that, unfortunately, are text and therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month). My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce much
faster a result than counting and checking individual cells with VBA.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Count dates -in text format- in October

=SUMPRODUCT(--(MONTH(DATEVALUE(A1:A6))=10))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Count dates -in text format- in October

How about:

=COUNTIF(C1:C6,"*-10-*")

Regards,
Fred.

"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Count dates -in text format- in October

Hi

Try
=COUNTIF(A:A,"=*10*")

--
Regards
Roger Govier

"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Count dates -in text format- in October

Hi Bob,

Yep, this is what I wanted. Works great.

Thank you,
Cooz


"Bob Phillips" wrote:

=SUMPRODUCT(--(MONTH(DATEVALUE(A1:A6))=10))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Count dates -in text format- in October

Hi Fred,

Ok! You can use wildcards with countif! I learn a lot here.
Thank you,

Cooz

"Fred Smith" wrote:

How about:

=COUNTIF(C1:C6,"*-10-*")

Regards,
Fred.

"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Count dates -in text format- in October

Good idea. Works fine.
Thank you,

Cooz


"Roger Govier" wrote:

Hi

Try
=COUNTIF(A:A,"=*10*")

--
Regards
Roger Govier

"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Count dates -in text format- in October

Hello Bob,

If I may take some more of your time...

When I look in the XL help on SUMPRODUCT, I can't find anything on using
this function with criteria. Yet your solution works perfectly. The help
doesn't mention "--" either.

Adding both: Does the "--" operator denote the usage of criteria? Can I use
this operator with other functions as well?

Thank you once again,

Cooz


"Bob Phillips" wrote:

=SUMPRODUCT(--(MONTH(DATEVALUE(A1:A6))=10))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Count dates -in text format- in October

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Cooz" wrote in message
...
Hello Bob,

If I may take some more of your time...

When I look in the XL help on SUMPRODUCT, I can't find anything on using
this function with criteria. Yet your solution works perfectly. The help
doesn't mention "--" either.

Adding both: Does the "--" operator denote the usage of criteria? Can I
use
this operator with other functions as well?

Thank you once again,

Cooz


"Bob Phillips" wrote:

=SUMPRODUCT(--(MONTH(DATEVALUE(A1:A6))=10))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count
all
dates in the column that represent a day in, say, October (or any
month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be
substituted
for XXX. Can this be done with a worksheet function and if so, what
would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count dates -in text format- in October

I would suggest using the dashes around the 10 like Fred showed, otherwise
the formula fails for the 10 of any month.

Rick


"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi

Try
=COUNTIF(A:A,"=*10*")

--
Regards
Roger Govier

"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any month).
My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be substituted
for XXX. Can this be done with a worksheet function and if so, what would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Count dates -in text format- in October

Very true, Rick. Mea Culpa.

--
Regards
Roger Govier

"Rick Rothstein (MVP - VB)" wrote in
message ...
I would suggest using the dashes around the 10 like Fred showed, otherwise
the formula fails for the 10 of any month.

Rick


"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi

Try
=COUNTIF(A:A,"=*10*")

--
Regards
Roger Govier

"Cooz" wrote in message
...
Hi everyone,

I have column filled with dates that, unfortunately, are text and
therefore
cannot be viewed as numbers. The problem I have to solve is to count all
dates in the column that represent a day in, say, October (or any
month). My
column looks like this:

A
12-10-2009
14-11-2009
17-10-2009
17-10-2009
15-10-2009
12-11-2009
(etcetera)

It would be nice if I could use something like
=COUNTIF(A1:A6;MID(XXX;3;4)="-10-")
but of course this won't work; there's nothing concrete to be
substituted
for XXX. Can this be done with a worksheet function and if so, what
would
this function look like?

Thank you,
Cooz

PS I use Excel 2000
PS I know how to do this with VBA but since the A1:A6 range I mentioned
above is actually Much Longer, using a worksheet function would produce
much
faster a result than counting and checking individual cells with VBA.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
show in text format the difference between 2 dates catrrmg Excel Discussion (Misc queries) 3 February 1st 08 11:03 AM
Text dates to date format jenn Excel Discussion (Misc queries) 6 June 4th 07 06:17 PM
how to format a cell to display October 21st, 2006 Naomi Excel Worksheet Functions 2 October 22nd 06 09:55 AM
Format text 'dates' to real dates Jacy Excel Worksheet Functions 4 July 24th 06 02:10 AM
How do I convert dates to text keeping the format? sprlarry Excel Discussion (Misc queries) 3 May 16th 05 06:06 AM


All times are GMT +1. The time now is 11:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"