Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountDays? need to count days in range by month

I have random date ranges over the month break, but I need to get a day count
by month to calculate rev by month.
Eg:
Range: 10/15/06-12/31/06 I need to know # of days in Oct, Nov, Dec from that
range.

Was going to set up one column/month to then put the result into a formula
to figure (total rev for deal / # days in deal)*# of days in deal in that
month=revenue for month

Hope that makes sense.
Any help?
thanks in advance,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default CountDays? need to count days in range by month

=sumproduct(--(text(a1:a10,"yyyymm")="200610"))
will count the number of days in October.

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html



MhyphenL wrote:

I have random date ranges over the month break, but I need to get a day count
by month to calculate rev by month.
Eg:
Range: 10/15/06-12/31/06 I need to know # of days in Oct, Nov, Dec from that
range.

Was going to set up one column/month to then put the result into a formula
to figure (total rev for deal / # days in deal)*# of days in deal in that
month=revenue for month

Hope that makes sense.
Any help?
thanks in advance,


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default CountDays? need to count days in range by month

=SUMPRODUCT(--(A1:A20-DAY(A1:A20)+1=DATE(2006,10,1)))

for October

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"MhyphenL" wrote in message
...
I have random date ranges over the month break, but I need to get a day
count
by month to calculate rev by month.
Eg:
Range: 10/15/06-12/31/06 I need to know # of days in Oct, Nov, Dec from
that
range.

Was going to set up one column/month to then put the result into a formula
to figure (total rev for deal / # days in deal)*# of days in deal in that
month=revenue for month

Hope that makes sense.
Any help?
thanks in advance,



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
Fomula for number of days on each month from a date range [email protected] Excel Discussion (Misc queries) 3 November 9th 06 03:08 AM
How can I count a record if it contains a date within a date range hile trotman Excel Worksheet Functions 0 September 20th 06 08:58 PM
Count cells within a date range Dewayne Excel Discussion (Misc queries) 7 August 20th 06 04:40 AM
Calculate Days in a Month LGG Excel Discussion (Misc queries) 6 January 13th 06 06:31 PM
how to extract a specific range of days (7 or 30) to make a chart accented Excel Worksheet Functions 0 January 9th 06 09:51 PM


All times are GMT +1. The time now is 06:05 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"