Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about:
=(D17-C17)+(DATE(YEAR(D17),MONTH(D17)+1,0)=D17) The first term computes the number of days - there is no need for DATEDIFF This give 4 in the case or 25 Nov to 29 Nov and 5 in the case or 25 Nov to 30 Nov. The second then checks is the D17 date is the end of the months and, if so, adds 1 best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "krc547" wrote in message ... what if I need to count number of days except if cell d17 is not the end of the month. Example C17 and D17 are as follows: c17=11/25/07 d17=11/29/07 instead of it returning 5 days I would need it to return 4 days because the client was not here until the end of the month. But I currently have this in my cell: =IF(C17="","0",DATEDIF(C17,D17,"D")+1) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting no of days of a specific range of days from a list | Excel Discussion (Misc queries) | |||
Help! Counting Sick Working Days Formula? | Excel Discussion (Misc queries) | |||
challenging formula(for me), counting days between dates for multipleyears | Excel Worksheet Functions | |||
Counting days formula | Excel Discussion (Misc queries) | |||
Counting Days of The Week Only In a Formula | Excel Programming |