Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Count the dates in a month

I want to count the dates in the month of May 2006 that are a "yes" condition
based on a column.

=SUMPRODUCT(--(Odyssey!$E$2:$E$605="Yes"),--(Odyssey!$AK$2:$AK$605="5/1/06
and 5/31/06"))

does not work

Thanks

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Count the dates in a month

=SUMPRODUCT(--(Odyssey!$E$2:$E$605="Yes"),
--(text(Odyssey!$AK$2:$AK$605,"yyyymm")="200605"))

is one way.


"s2m via OfficeKB.com" wrote:

I want to count the dates in the month of May 2006 that are a "yes" condition
based on a column.

=SUMPRODUCT(--(Odyssey!$E$2:$E$605="Yes"),--(Odyssey!$AK$2:$AK$605="5/1/06
and 5/31/06"))

does not work

Thanks

--
Message posted via http://www.officekb.com


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Count the dates in a month


Assuming you want to count all dates in May 2006 if E = yes then.


=SUMPRODUCT((Odyssey!$E$2:$E$605="yes")*(Odyssey!$ AK$2:$AK$605=DATE(2006,5,1))*(Odyssey!$AK$2:$AK$6 05<=DATE(2006,5,31)))

Dates are recognized as numbers in Excel so if you were using
"5/1/2006", excel wouldn't recognize that because it is text.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=568365

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Count the dates in a month

That works.

Is there a way I can create a variable for a defined date range? Something
like this APR = 4/1/06 thru 4/30/06.

This way I could just use one statement instead of having 2, something like
this

=SUMPRODUCT((Odyssey!$E$2:$E$700=$A4)*(Odyssey!$S$ 2:$S$700=APR))

Thanks



SteveG wrote:
Assuming you want to count all dates in May 2006 if E = yes then.

=SUMPRODUCT((Odyssey!$E$2:$E$605="yes")*(Odyssey! $AK$2:$AK$605=DATE(2006,5,1))*(Odyssey!$AK$2:$AK$ 605<=DATE(2006,5,31)))

Dates are recognized as numbers in Excel so if you were usin
"5/1/2006", excel wouldn't recognize that because it is text.

HTH

Stev


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200608/1

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Count the dates in a month

If it's for a single year:

=SUMPRODUCT((Odyssey!$E$2:$E$700=$A4)*(Month(Odyss ey!$S$2:$S$700)=APR))

Set APR=4

OR

=SUMPRODUCT((Odyssey!$E$2:$E$700=$A4)*(Month(Odyss ey!$S$2:$S$700)=RepMonth))

Set RepMonth to be 1-12 as required

HTH

"s2m via OfficeKB.com" wrote:

That works.

Is there a way I can create a variable for a defined date range? Something
like this APR = 4/1/06 thru 4/30/06.

This way I could just use one statement instead of having 2, something like
this

=SUMPRODUCT((Odyssey!$E$2:$E$700=$A4)*(Odyssey!$S$ 2:$S$700=APR))

Thanks



SteveG wrote:
Assuming you want to count all dates in May 2006 if E = yes then.

=SUMPRODUCT((Odyssey!$E$2:$E$605="yes")*(Odyssey! $AK$2:$AK$605=DATE(2006,5,1))*(Odyssey!$AK$2:$AK$ 605<=DATE(2006,5,31)))

Dates are recognized as numbers in Excel so if you were usin
"5/1/2006", excel wouldn't recognize that because it is text.

HTH

Stev


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200608/1




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Count the dates in a month


Yes,

You can create a list of all the dates in April and name that range APR
and apply it to your formula. Say A1:A30 = 4/1/2006 - 4/30/2006.
Select the range. Go to Insert,Name,Define. Type the name you want
and click OK.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=568365

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
Count number of cells of a particular month in a column of dates Gohan51D Excel Discussion (Misc queries) 9 March 15th 06 07:21 PM
Simple Way to Count the Number of Duplicate Dates on Multiple Worksheets Dan Excel Discussion (Misc queries) 2 February 23rd 06 11:46 PM
Calculating revenue per month by aggregating dates Commutervet Excel Worksheet Functions 5 February 17th 06 02:15 PM
Count the occurances of a month in a range of date fields Keith Brown Excel Worksheet Functions 8 March 14th 05 11:24 AM
PivotTable - Count by Month Gigi Excel Worksheet Functions 3 January 1st 05 12:30 PM


All times are GMT +1. The time now is 06:55 AM.

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"