Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ajay
 
Posts: n/a
Default Sumproduct and list of dates

Morning All,
I have a list of dates in a column I need to know how many are from January,
February, March etc.
The formula I am currently using is
=SUMPRODUCT(--(MONTH(Rng)=1)),--(ISNUMBER(Rng)))
this works fine if all the dates are from one year eg all 2004, however I
now have data containing dates from 2004 and 2005.
How can I adapt the formula to distinguish btn Jan 2004 and Jan 2005?
TIA
Ajay
  #2   Report Post  
Leo Heuser
 
Posts: n/a
Default

Hi Ajay

One way:

=SUMPRODUCT(--(MONTH(Rng)=1)),--(YEAR(Rng)=2004)),--(ISNUMBER(Rng)))


--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Ajay" skrev i en meddelelse
...
Morning All,
I have a list of dates in a column I need to know how many are from
January,
February, March etc.
The formula I am currently using is
=SUMPRODUCT(--(MONTH(Rng)=1)),--(ISNUMBER(Rng)))
this works fine if all the dates are from one year eg all 2004, however I
now have data containing dates from 2004 and 2005.
How can I adapt the formula to distinguish btn Jan 2004 and Jan 2005?
TIA
Ajay



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(Year(Rng)=2005), --(MONTH(Rng)=1))

or

=SUMPRODUCT(--(TEXT(rng,"yyyymm")="200501"))

--
HTH

Bob Phillips

"Ajay" wrote in message
...
Morning All,
I have a list of dates in a column I need to know how many are from

January,
February, March etc.
The formula I am currently using is
=SUMPRODUCT(--(MONTH(Rng)=1)),--(ISNUMBER(Rng)))
this works fine if all the dates are from one year eg all 2004, however I
now have data containing dates from 2004 and 2005.
How can I adapt the formula to distinguish btn Jan 2004 and Jan 2005?
TIA
Ajay



  #4   Report Post  
Mangesh
 
Posts: n/a
Default

If you know the year, then use:
=SUMPRODUCT(--(MONTH(rng)=1),--(YEAR(rng)=2006),--(ISNUMBER(rng)))

- Mangesh


"Ajay" wrote in message
...
Morning All,
I have a list of dates in a column I need to know how many are from

January,
February, March etc.
The formula I am currently using is
=SUMPRODUCT(--(MONTH(Rng)=1)),--(ISNUMBER(Rng)))
this works fine if all the dates are from one year eg all 2004, however I
now have data containing dates from 2004 and 2005.
How can I adapt the formula to distinguish btn Jan 2004 and Jan 2005?
TIA
Ajay



  #5   Report Post  
Ajay
 
Posts: n/a
Default

Thanks everyone they all work
Ajay

"Mangesh" wrote:

If you know the year, then use:
=SUMPRODUCT(--(MONTH(rng)=1),--(YEAR(rng)=2006),--(ISNUMBER(rng)))

- Mangesh


"Ajay" wrote in message
...
Morning All,
I have a list of dates in a column I need to know how many are from

January,
February, March etc.
The formula I am currently using is
=SUMPRODUCT(--(MONTH(Rng)=1)),--(ISNUMBER(Rng)))
this works fine if all the dates are from one year eg all 2004, however I
now have data containing dates from 2004 and 2005.
How can I adapt the formula to distinguish btn Jan 2004 and Jan 2005?
TIA
Ajay




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
SUMPRODUCT and format problems (2) Chrism Excel Discussion (Misc queries) 2 April 5th 05 06:38 PM
Sumproduct on filtered cells Ndel40 Excel Worksheet Functions 19 January 20th 05 10:17 PM
SUMPRODUCT ON TIMES Bob Phillips Excel Worksheet Functions 1 January 13th 05 05:28 PM
SUMPRODUCT ON DATES RagDyeR Excel Worksheet Functions 3 January 13th 05 04:21 PM
SUMIF or SUMPRODUCT or something else? || cypher || Excel Worksheet Functions 7 November 9th 04 10:45 PM


All times are GMT +1. The time now is 05:34 AM.

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"