Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am looking for a formula that will return the number of days of a
particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
?? How can April have 55 days. I always thought it was limited to 30 days.
-- Don Guillett Microsoft MVP Excel SalesAid Software "ibvalentine" wrote in message ... I am looking for a formula that will return the number of days of a particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming the '55 days' in April is a typo, you probably want something like
this: =MAX(0,MIN(B1,DATE(2009,5,1))-MAX(A1,DATE(2009,4,1))) It will return zero if the date range doesn't span any days in April, as in your second example. Regards, Fred. "ibvalentine" wrote in message ... I am looking for a formula that will return the number of days of a particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Correction: Only 16 days for April.
"Don Guillett" wrote: ?? How can April have 55 days. I always thought it was limited to 30 days. -- Don Guillett Microsoft MVP Excel SalesAid Software "ibvalentine" wrote in message ... I am looking for a formula that will return the number of days of a particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Fred!!!!! It works great!!!
"Fred Smith" wrote: Assuming the '55 days' in April is a typo, you probably want something like this: =MAX(0,MIN(B1,DATE(2009,5,1))-MAX(A1,DATE(2009,4,1))) It will return zero if the date range doesn't span any days in April, as in your second example. Regards, Fred. "ibvalentine" wrote in message ... I am looking for a formula that will return the number of days of a particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Glad I could help. Thanks for the feedback.
Regards, Fred. "ibvalentine" wrote in message ... Thanks Fred!!!!! It works great!!! "Fred Smith" wrote: Assuming the '55 days' in April is a typo, you probably want something like this: =MAX(0,MIN(B1,DATE(2009,5,1))-MAX(A1,DATE(2009,4,1))) It will return zero if the date range doesn't span any days in April, as in your second example. Regards, Fred. "ibvalentine" wrote in message ... I am looking for a formula that will return the number of days of a particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Did you test with other dates such as 1 jan to 31 dec.
-- Don Guillett Microsoft MVP Excel SalesAid Software "Fred Smith" wrote in message ... Glad I could help. Thanks for the feedback. Regards, Fred. "ibvalentine" wrote in message ... Thanks Fred!!!!! It works great!!! "Fred Smith" wrote: Assuming the '55 days' in April is a typo, you probably want something like this: =MAX(0,MIN(B1,DATE(2009,5,1))-MAX(A1,DATE(2009,4,1))) It will return zero if the date range doesn't span any days in April, as in your second example. Regards, Fred. "ibvalentine" wrote in message ... I am looking for a formula that will return the number of days of a particular month between start and end dates. For example, if the start and end dates are as follows: 2/23/09 5/6/09 3/12/09 3/28/09 3/2/09 4/16/09 How many days is there in April for each of the three start and end dates? For the first record, there should be 30 days, for the second, 16 days, and for the third, 55 days, but what is the formula? |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
No, I just tested your formula. Fred's formula worked for my particular case,
but does not work throughout the calendar year. Yours works in all cases. Thanks for the input. "Don Guillett" wrote: Did you test with other dates such as 1 jan to 31 dec. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can I calculate number of days based on start and end dates? | Excel Worksheet Functions | |||
Calculating number of days including the start and end date | Excel Discussion (Misc queries) | |||
Calculating number of days including the start and end date | Excel Discussion (Misc queries) | |||
Counting number of days up to an empty cell then start over again | Excel Discussion (Misc queries) | |||
Number of days in month counted from shortened name of month & yea | Excel Worksheet Functions |