Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jr100
 
Posts: n/a
Default Need help with a date calculation


Hi,

HELP!

Any help with this issue would be great. I'm trying to count the
number of days for a given month in a range of cells that contain
multiple months.

Example:

1/1/6
3/1/6
1/2/6
1/5/6
2/2/6
2/7/6

Answer: the number of days in January is 3, the # of days in March is
1, the number of days in February is 2.

I've tried a variety of formulas, from counti, datedif, sumif,
sumproduct, etc. and can't seem to get them to work.

Any Ideas or help would be greatly appreciated.

Thank you!


--
jr100
------------------------------------------------------------------------
jr100's Profile: http://www.excelforum.com/member.php...o&userid=31335
View this thread: http://www.excelforum.com/showthread...hreadid=510159

  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Need help with a date calculation


Try something like this:

If only the month is significant:
=SUMPRODUCT(ISNUMBER(A1:A10)*(MONTH(A1:A10)=1))

If the month and year are significant:
=SUMPRODUCT(ISNUMBER(A1:A10)*(MONTH(A1:A10)=1)*(YE AR(A1:A10)=2006))


Does that help?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=510159

  #3   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Need help with a date calculation

=SUMPRODUCT(--(ISNUMBER(A2:A50)),--(MONTH(A2:A50)=1))

for January, for the rest of the months you only need

=SUMPRODUCT(--(MONTH(A2:A50)=2))

(for February)

the reason is that a blank cell will be interpreted as month number 1 thus
the extra condition for Jan

--
Regards,

Peo Sjoblom

Portland, Oregon




"jr100" wrote in
message ...

Hi,

HELP!

Any help with this issue would be great. I'm trying to count the
number of days for a given month in a range of cells that contain
multiple months.

Example:

1/1/6
3/1/6
1/2/6
1/5/6
2/2/6
2/7/6

Answer: the number of days in January is 3, the # of days in March is
1, the number of days in February is 2.

I've tried a variety of formulas, from counti, datedif, sumif,
sumproduct, etc. and can't seem to get them to work.

Any Ideas or help would be greatly appreciated.

Thank you!


--
jr100
------------------------------------------------------------------------
jr100's Profile:
http://www.excelforum.com/member.php...o&userid=31335
View this thread: http://www.excelforum.com/showthread...hreadid=510159


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
Date Calculation to exclude weekends Vim Excel Worksheet Functions 2 January 24th 06 02:58 PM
Calculation based with Range of Date Rao Ratan Singh New Users to Excel 1 January 24th 06 09:05 AM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Due Date Calculation? Randy New Users to Excel 11 July 14th 05 07:44 PM
Recurring annual events using a specific date as a trigger date Bamboozled Excel Worksheet Functions 1 June 6th 05 01:44 PM


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