Converting date of a month to last working day of the month
I want to calculate date of retirement of some staff members. But the problem is that it is calculating date of retirement from date of birth by adding either 60 years or 58 years as the case may be. But the date remains the same as given in the date of birth of the person. I want to make the date to be the last working day of the month. Please help.
An expert who has achieved level 2 by getting 100 points
An expert that got 5 achievements.
An expert whose answer got voted for 20 times.
An expert who has answered 20 questions.
Re: converting date of a month to last working day of the...
Use the below formula to get the date of the LWD (Monday thru Friday) of the month. Assumed that if the date in cell A1 is 6-May-2005. then formula will be
- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
The WorkDay Function returns a number that's the serial date that is the indicated number of working days from a given date (the starting date). Working days EXCLUDE weekends and any dates identified as holidays. Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected delivery times, or the number of days of work performed.
The Syntax is:
- start_date is in Date format (and can be a calculated value);
- days is a number of elapsed days after start_date (can be calculated, can be negative to indicate a date BEFORE start_date);
- holidays is an array of holidays you can specify if desired.
not sure if this is what you are after entirely but should at least help you out some what
As you said you cant just divide by 3 but I have divided the formula by 3 to see how many 3 months will go into the output you could maybe have another formula to divide it by 2 to see if it will divide by 2 to see if you get a whole number or not, if you do then you can just return the first part before the dot ( using split function ) and if the value is less then 1 then obviously the 3 months has not passed between the 2 dates
Without looking at your books, I can only hazard a few guesses. One is that the person is salaried and by pay date the calculation is figuring on an extra payweek. There are 53 Sun, Mon, Tue and Wednesdays in this year. Check the math and see if that is the problem (to correct add an extra pay week into the salaried amount in the employee profile)
There is no function to do this as part of a whole suite of date manipulation functions, but I seem to have imagined that, as I couldn’t find. I was dreading having to do lots of nasty date arithmetic, but then I discovered that the zeroth day of a month is treated as the last day of the previous month! So the last day of the month for the date that’s in cell B3 is simply:
=DATE(YEAR(B3), MONTH(B3)+1, 0)
It even works across year boundaries, so DATE(2004, 13, 0) really does give
I guess you mean vacation accrual. It's hard to help you here, without knowing the exact accrual formula.
However here are some tips:
Set up a column with the start date for each employee and use the today() function to get today's date.
You can use the days360() funtion to calculate the number of days between two dates, assuming regular 30 days/month.
For more date related functions, click on the Fx (letter f with an subscript x) to the left of the value/formula entry field at the top of the spreadsheet. Thsi gives you a wizard with a list of functions. Select the Data/Time group and you see all available functions and can interactively pull them together.