Hi
Gurus
Please advic eme how can i get the no of
1.business days in a month and
2.elapsed days
where if i can fill in the holidays in another column
referring to the holidays column i must be able to achive the above two
thanks for your great help earlier and in advance
A1 = First Day of Month
B1 = End of Month
Holidays = Named Range
=NETWORKDAYS(A1,B1,Holidays)
HTH
Regards, Jeff
If you like the answer(s) provided, why not add some reputation by clicking the * below
Please use [ Code ] tags when posting [ /Code ]
Please view/read the Forum rules --- How to mark a thread as solved
If you want elapsed business days in the current month (including TODAY) try
=NETWORKDAYS(EOMONTH(TODAY(),-1)+1,TODAY(),holidays)
......and total business days in the current month
=NETWORKDAYS(EOMONTH(TODAY(),-1)+1,EOMONTH(TODAY(),0),holidays)
Audere est facere
Hi thanks for the repsonse
but my requirement is to find the no of business days in the particular month only.
sorry i was not specific in mypost
it should be based on the month drop down selected
if the the user selects may then it must show
1.the number of business days in the may month
2. and if the previous month selected for example may then the elapsed days will be equal to the business days in the may month
3. if june is selected then assuming that today is the 29th june
a. business days must be 22
b. elapsed days must be 21
4. if may is selected when the current month is june , then it must never show the days in june but must show only may month business days
hope it is not confusing
thanks
So what exactly does the dropdown show? A date? just a month like "December" or a month and year......
Audere est facere
Assuming A1 is year, B1 is month and C1 is day then to get total business days in that whole month try this formula
=NETWORKDAYS(EOMONTH(C1&B1&A1,-1),EOMONTH(C1&B1&A1,0),holidays)
I'm not sure what you want for elapsed days. What if 4th Jun 2011 is selected - do you want business days from then to now? (or will the day only be 1)?
What about previous dates (or future dates)?
Audere est facere
Sorry - I missed out a +1 which means that the count included the last day of the previous month - should be
=NETWORKDAYS(EOMONTH(C1&B1&A1,-1)+1,EOMONTH(C1&B1&A1,0),holidays)
and for elapsed days
=MAX(0,NETWORKDAYS(MAX(C1&B1&A1,EOMONTH(TODAY(),-1)+1),TODAY()-1,holidays))
Last edited by daddylonglegs; 06-30-2011 at 05:48 PM.
Audere est facere
I donot want the holidays to be considered
if we donot consider the holidays
my formula would be
MAX(0,NETWORKDAYS(MAX($AL$64&$AL$63&$AL$62,EOMONTH(TODAY(),-1)+1),TODAY()-1))
but the result for the month of june is 18 days
am i doing something wrong ?
the earlier formula for no of business days in a month works perfectly
thanks
Are you saying that you get 18 when you shouldn't or you want to get 18 and you don't? For which dates, what's in $AL$64, and $AL$63 and $AL$62?
Audere est facere
the formula to calculate elapsed days (not counting today) is
MAX(0,NETWORKDAYS(MAX(C1&B1&A1,EOMONTH(TODAY(),-1)+1),TODAY()-1))
results only 18 for the month of jun
which should actually result as 21 if not counting today
it should result in 21 days
sorry if my question was not clear in the previous post
thanks
Try this,
Delete the C1 (Day) in MAX formula & just keep B1&A1 (Month&Year),
MAX(0,NETWORKDAYS(MAX(B1&A1,EOMONTH(TODAY(),-1)+1),TODAY()-1))
You are on safe hands with DLL, wait for his response.
HTH; Haseeb
If your problem is solved, please say so clearly, and mark your thread as Solved:
Forum Rules & How to Mark a thread as SOLVED
Given the above doesn't that formula work correctly? If I use this formula
=MAX(0,NETWORKDAYS(MAX(C1&B1&A1,EOMONTH(TODAY(),-1)+1),TODAY()-1))
where today is 30th June, A1 = 2011, B1 = June (or Jun) and C1 = 4 then I get 18 as requested. If I change the 4 to a 1 I get 21 as expected. If I use any date earlier than 1st June then I still get 21.
Can you confirm
a) if that's what you want
b) if that's what you get
Thanks
Audere est facere
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks