Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Counting dates....

Trying to do a calculation to count the number of people who are aged between
30 and 40 have their dates of birth in a table trying to get the formula to
work because it has to be greater than one date AND smaller than another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 718
Default Counting dates....

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans le
message de news: ...
Trying to do a calculation to count the number of people who are aged
between
30 and 40 have their dates of birth in a table trying to get the formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 718
Default Counting dates....

The -- is used to turn string litteral into numeric value.
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97=--"30/05/1966"))

Cheers,
--
AP

"SteveW" a écrit dans le message de news:
op.tci39vlwevjsnp@enigma03...
Since when, and why does excel accept "<--" as "<=" ?

Steve

On Tue, 11 Jul 2006 15:23:40 +0100, Ardus Petus
wrote:

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans le
message de news: ...
Trying to do a calculation to count the number of people who are aged
between
30 and 40 have their dates of birth in a table trying to get the formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")






--
Steve (3)



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 427
Default Counting dates....

Cheers, thanks for that.

Now I see it works, but I can't find any reference to it in my 2003 Help
file

Has it been one of those hidden features ?

Steve


On Tue, 11 Jul 2006 15:51:02 +0100, Ardus Petus
wrote:

The -- is used to turn string litteral into numeric value.
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97=--"30/05/1966"))

Cheers,
--
AP

"SteveW" a écrit dans le message de news:
op.tci39vlwevjsnp@enigma03...
Since when, and why does excel accept "<--" as "<=" ?

Steve

On Tue, 11 Jul 2006 15:23:40 +0100, Ardus Petus

wrote:

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans le
message de news: ...
Trying to do a calculation to count the number of people who are aged
between
30 and 40 have their dates of birth in a table trying to get the
formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")





--
Steve (3)






--
Steve (3)
  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default Counting dates....

The double unary is a useful tool to convert non-numeric data to numeric,
where it can of course. So a date form like "2006-07-11" can be transformed
to an Excel date (which is just a number) by preceding with the double
unary. Similarly, True can be transformed to 1, and False to 0, which is the
basis of many SUMPRODUCT formulae seen around. See
http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"SteveW" wrote in message
news:op.tci5ioleevjsnp@enigma03...
Cheers, thanks for that.

Now I see it works, but I can't find any reference to it in my 2003 Help
file

Has it been one of those hidden features ?

Steve


On Tue, 11 Jul 2006 15:51:02 +0100, Ardus Petus
wrote:

The -- is used to turn string litteral into numeric value.
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97=--"30/05/1966"))

Cheers,
--
AP

"SteveW" a écrit dans le message de news:
op.tci39vlwevjsnp@enigma03...
Since when, and why does excel accept "<--" as "<=" ?

Steve

On Tue, 11 Jul 2006 15:23:40 +0100, Ardus Petus

wrote:

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans le
message de news: ...
Trying to do a calculation to count the number of people who are aged
between
30 and 40 have their dates of birth in a table trying to get the
formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")





--
Steve (3)






--
Steve (3)





  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 252
Default Counting dates....

putting the double negative before a text string is the same thing as using
the VALUE function. You actually could perform any mathematical function on
a text string that can be a number (or boolean value). For example
="01"+"005"
returns the number 6 (as a number not text). It just so happens that -- is
the easiest way to convert text to a number; as opposed to: the VALUE
function, 0+, 1*, etc.

*copied from the help under the VALUE function...

Remark

You do not generally need to use the VALUE function in a formula because
Microsoft Excel automatically converts text to numbers as necessary. This
function is provided for compatibility with other spreadsheet programs.


"SteveW" wrote:

Cheers, thanks for that.

Now I see it works, but I can't find any reference to it in my 2003 Help
file

Has it been one of those hidden features ?

Steve


On Tue, 11 Jul 2006 15:51:02 +0100, Ardus Petus
wrote:

The -- is used to turn string litteral into numeric value.
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97=--"30/05/1966"))

Cheers,
--
AP

"SteveW" a écrit dans le message de news:
op.tci39vlwevjsnp@enigma03...
Since when, and why does excel accept "<--" as "<=" ?

Steve

On Tue, 11 Jul 2006 15:23:40 +0100, Ardus Petus

wrote:

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans le
message de news: ...
Trying to do a calculation to count the number of people who are aged
between
30 and 40 have their dates of birth in a table trying to get the
formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")





--
Steve (3)






--
Steve (3)

  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 427
Default Counting dates....

On Tue, 11 Jul 2006 16:14:19 +0100, Bob Phillips
wrote:

The double unary is a useful tool to convert non-numeric data to numeric,
where it can of course. So a date form like "2006-07-11" can be
transformed
to an Excel date (which is just a number) by preceding with the double
unary. Similarly, True can be transformed to 1, and False to 0, which is
the
basis of many SUMPRODUCT formulae seen around. See
http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.


!!! Opera doesn't like that site - 50 lines of code appear at the start :)

but I see the explanation of --

--
Steve (3)
  #8   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 427
Default Counting dates....

Neat, and + on it's won't actuall do anything.

I could see it's effect from the start once I realised it wasn't (<=!)
But it's so annoying when it's difficult to find it in the help etc etc

Steve


On Tue, 11 Jul 2006 16:52:01 +0100, Sloth
wrote:

putting the double negative before a text string is the same thing as
using
the VALUE function. You actually could perform any mathematical
function on
a text string that can be a number (or boolean value). For example
="01"+"005"
returns the number 6 (as a number not text). It just so happens that --
is
the easiest way to convert text to a number; as opposed to: the VALUE
function, 0+, 1*, etc.

*copied from the help under the VALUE function...

Remark

You do not generally need to use the VALUE function in a formula because
Microsoft Excel automatically converts text to numbers as necessary. This
function is provided for compatibility with other spreadsheet programs.


"SteveW" wrote:

Cheers, thanks for that.

Now I see it works, but I can't find any reference to it in my 2003 Help
file

Has it been one of those hidden features ?

Steve


On Tue, 11 Jul 2006 15:51:02 +0100, Ardus Petus

wrote:

The -- is used to turn string litteral into numeric value.
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97=--"30/05/1966"))

Cheers,
--
AP

"SteveW" a écrit dans le message de news:
op.tci39vlwevjsnp@enigma03...
Since when, and why does excel accept "<--" as "<=" ?

Steve

On Tue, 11 Jul 2006 15:23:40 +0100, Ardus Petus

wrote:

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans

le
message de news:

...
Trying to do a calculation to count the number of people who are

aged
between
30 and 40 have their dates of birth in a table trying to get the
formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")





--
Steve (3)





--
Steve (3)




--
Steve (3)
  #9   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default Counting dates....

Not quite, try doing

=VALUE(TRUE)

and

=--TRUE

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sloth" wrote in message
...
putting the double negative before a text string is the same thing as

using
the VALUE function. You actually could perform any mathematical function

on
a text string that can be a number (or boolean value). For example
="01"+"005"
returns the number 6 (as a number not text). It just so happens that --

is
the easiest way to convert text to a number; as opposed to: the VALUE
function, 0+, 1*, etc.

*copied from the help under the VALUE function...

Remark

You do not generally need to use the VALUE function in a formula because
Microsoft Excel automatically converts text to numbers as necessary. This
function is provided for compatibility with other spreadsheet programs.


"SteveW" wrote:

Cheers, thanks for that.

Now I see it works, but I can't find any reference to it in my 2003 Help
file

Has it been one of those hidden features ?

Steve


On Tue, 11 Jul 2006 15:51:02 +0100, Ardus Petus


wrote:

The -- is used to turn string litteral into numeric value.
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97=--"30/05/1966"))

Cheers,
--
AP

"SteveW" a écrit dans le message de news:
op.tci39vlwevjsnp@enigma03...
Since when, and why does excel accept "<--" as "<=" ?

Steve

On Tue, 11 Jul 2006 15:23:40 +0100, Ardus Petus

wrote:

Try:
=SUMPRODUCT((B2:B97<--"30/05/1976")*(B2:B97--"30/05/1966"))

Cheers,
--
AP

"ExcelDummie" a écrit dans

le
message de news:

...
Trying to do a calculation to count the number of people who are

aged
between
30 and 40 have their dates of birth in a table trying to get the
formula
to
work because it has to be greater than one date AND smaller than
another????

=COUNTIF(B2:B97,"<30/05/1976",=30/05/1966")





--
Steve (3)





--
Steve (3)



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
counting occasions dates occur between 2 dates hoyt New Users to Excel 5 June 16th 06 08:11 AM
Counting Dates PH NEWS Excel Worksheet Functions 2 February 21st 06 04:07 PM
Counting dates for a the present month but not future months BrianInCalifornia Excel Worksheet Functions 3 December 7th 05 02:00 AM
Counting individual dates Robin Excel Discussion (Misc queries) 5 June 15th 05 07:02 PM
counting entries between two dates? Todd Excel Worksheet Functions 7 November 1st 04 11:07 PM


All times are GMT +1. The time now is 03:27 PM.

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

About Us

"It's about Microsoft Excel"