excell #10

Hello,
Iam trying very hard to find a fourmula in order to calculate holiday

for my employees.
The problem is as follow...
If they are in the company for less than 2 years they are entitle to
20 days between the 1st of January and the 31st of december
If they are in the company between 2 and 5 years they are entitle to
22 days from their anniversary date.
If they are in the company for more than 5 years they are entitle to
25 days from their anniversary date.

My problem is to take in consideration their anniversary date (ex
starting date the 15 of march 2000 how many holidays does this perso

get?)

If anyone could get back to me on this one I will be very gratfull :
Here is the formula I have for the 20 day
=((((IF(C7<>0,IF(YEAR(C7)<YEAR(NOW()),20,ROUNDUP(1.66*(12-MONTH(C7)+(IF(MONTH(C7)<>2,IF(MONTH(C7)>7,IF(MOD(MONTH(C7),2)>0,30,31),IF(MOD(MONTH(C7),2)>0,31,30)),(IF(MOD(YEAR(C7),4)>0,28,29)))-DAY(C7)+1)/IF(MONTH(C7)<>2,IF(MONTH(C7)>7,IF(MOD(MONTH(C7),2)>0,30,31),IF(MOD(MONTH(C7),2)>0,31,30)),(IF(MOD(YEAR(C7),4)>0,28,29)))),3)),0)))*A7)-Q7)-((((IF(V7<>0,IF(YEAR(V7)<YEAR(NOW()),20,ROUNDUP(1.66*(12-MONTH(V7)+(IF(MONTH(V7)<>2,IF(MONTH(V7)>7,IF(MOD(MONTH(V7),2)>0,30,31),IF(MOD(MONTH(V7),2)>0,31,30)),(IF(MOD(YEAR(V7),4)>0,28,29)))-DAY(V7)+1)/IF(MONTH(V7)<>2,IF(MONTH(V7)>7,IF(MOD(MONTH(V7),2)>0,30,31),IF(MOD(MONTH(V7),2)>0,31,30)),(IF(MOD(YEAR(V7),4)>0,28,29)))),3)),0)))*A7)
    

 :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol

0
cvaisser (2)
5/2/2005 5:28:29 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
651 Views

Similar Articles

[PageSpeed] 18

Good morning, Catherine-
Will a slightly more simplistic view work?  I mocked up a formula with
three columns: a header in A2 that says "Start date"; a header in B2
that says "Employed Years", and a header in C2 that says "Vacation
days".  In A3 I used your sample date, March 15 2000.  I used this
formula in B3:
=(TODAY()-A3)/365
.... which generates a fractional number of years the employee has
worked.  This is the oversimplification: it assumes 365 days in every
years, which is not always the case but arguably has little impact on
the intent of the calculation.

The formula in C3 is
=IF(B3<2,20,IF(AND(B3>=2,B3<=5),22,IF(B3>5,25,"")))
.... which tells the allowed number of vacation days.

Does that do it for you?

0
CycleZen (674)
5/2/2005 11:46:22 AM
Catherine,

I am making some assumptions:

> If they are in the company for less than 2 years they are entitle to
> 20 days between the 1st of January and the 31st of december
I assume that, as in my company, only whole years between 1st January and
31st December are counted.  This means that in the first part year, (in your
example between 15th March until the 31st December you get a proportion,(0.6
days) for every month - 15 days in the first part year.  After that all
holidays are calculated assuming that the employee will be employed until
31st December.  Therefore in your example in the year 2001 the employee
would be due 20 days.



To simplify the formula I used a helper cell, (E1),  to calculate the number
of complete years for use in the calculation.  If you do not want to use a
helper cell then you will have to replace E1 the formula with the formula in
Cell E1.  The employee's start date is in D1 and the formula to calculate
the holidays due is:

=IF(E1=0,INT(DATEDIF(D1,DATE(YEAR(D1),12,31),"m")/12*20),(E1>0)*20+(E1>=2)*2
+(E1>=5)*3)

HTH

Sandy

-- 
to e-mail direct replace @mailinator.com with @tiscali.co.uk


"CATHERINE" <cvaisser@hertz-dot-com.no-spam.invalid> wrote in message
news:0b2dnRZkj7zgJ-jfRVn_vg@giganews.com...
> Hello,
> Iam trying very hard to find a fourmula in order to calculate holidays
>
> for my employees.
> The problem is as follow...
> If they are in the company for less than 2 years they are entitle to
> 20 days between the 1st of January and the 31st of december
> If they are in the company between 2 and 5 years they are entitle to
> 22 days from their anniversary date.
> If they are in the company for more than 5 years they are entitle to
> 25 days from their anniversary date.
>
> My problem is to take in consideration their anniversary date (ex
> starting date the 15 of march 2000 how many holidays does this person
>
> get?)
>
> If anyone could get back to me on this one I will be very gratfull :
> Here is the formula I have for the 20 days
>
=((((IF(C7<>0,IF(YEAR(C7)<YEAR(NOW()),20,ROUNDUP(1.66*(12-MONTH(C7)+(IF(MONT
H(C7)<>2,IF(MONTH(C7)>7,IF(MOD(MONTH(C7),2)>0,30,31),IF(MOD(MONTH(C7),2)>0,3
1,30)),(IF(MOD(YEAR(C7),4)>0,28,29)))-DAY(C7)+1)/IF(MONTH(C7)<>2,IF(MONTH(C7
)>7,IF(MOD(MONTH(C7),2)>0,30,31),IF(MOD(MONTH(C7),2)>0,31,30)),(IF(MOD(YEAR(
C7),4)>0,28,29)))),3)),0)))*A7)-Q7)-((((IF(V7<>0,IF(YEAR(V7)<YEAR(NOW()),20,
ROUNDUP(1.66*(12-MONTH(V7)+(IF(MONTH(V7)<>2,IF(MONTH(V7)>7,IF(MOD(MONTH(V7),
2)>0,30,31),IF(MOD(MONTH(V7),2)>0,31,30)),(IF(MOD(YEAR(V7),4)>0,28,29)))-DAY
(V7)+1)/IF(MONTH(V7)<>2,IF(MONTH(V7)>7,IF(MOD(MONTH(V7),2)>0,30,31),IF(MOD(M
ONTH(V7),2)>0,31,30)),(IF(MOD(YEAR(V7),4)>0,28,29)))),3)),0)))*A7))
>
>
>  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:
>



0
sandymann (252)
5/2/2005 9:09:08 PM
Reply:

Similar Artilces:

number rounding in MS Excel
Hi, This may have been answered many times. In MS EXCEL is there a way that it calculates all numbers to 2 decimal digit accuracy instead of the 15 digit default? Thanks in advance for the answer. Hi You can set your decimal places in your cells as 2 and then check Precision As Displayed on the Tools / Options / Calculation page. Be careful though, it means what it says!! -- Andy. "mahusain" <abidh@bdnet.net> wrote in message news:ab59c6f6.0404200315.5196e8aa@posting.google.com... > Hi, > > This may have been answered many times. > > In MS EXCEL is ther...

SpreadSheetML (XML for Excel)
Hello All, A client of mine has Office X for Mac. I am wondering if this edition of Excel supports SpreadSheetML. I have heard that it also support the new Open XML formats (same as Office 11). Does anyone know if either of these statements is accurate? Thanks in advance, -KJ Hi KJ: I believe that both statements are wrong. The XML converter for Office Next on the Mac has not yet been developed. It's not likely to come until after the PC Office team ships their product to retail -- until they stop CHANGING the thing :-) My guess is that the converter won't appear until sometime...

Windows Server 2008 R2 04-09-10
Windows Server 2008 R2 and Windows 7 share the same code? how is that possible when Windows 7 has both 32 bit and 64 bit versions and windows server 2008 r2 is only 64 bit Hello Charle, As Microsoft is going to use only 64bit versions for servers they don't built the 32bit version. Sharing the same code doesn't mean that the server OS use exaclty the same files, there are a lot more and different ones. But the basic code is the same. Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ...

Filters in Excel 2003
I am using Filters in Excel 2003. Every cell in sheet B is linked to every cell in sheet A. That way I can alter data in B without corrupting the original data in A. I then highlight the cells in B that I want to assign a filter to and select Advanced Filter. I have no criteria so I do not set that. I click OK. I then select Filter again and this time select Auto Filter. Drop down arrows appear at the top of my columns. Great, no problems so far, I then select from the drop down list the criteria that I want to filter. Again no problems, my list filters correctly. But once I have do...

Public Folder link to Excel File
Hi - I have a user that claims that he had a shortcut to a spreadsheet "in his public folders" at his old job. Obviously, he's an end user that may or may not know what he's talking about.... I'm trying to figure out the best way to accomodate him. He basically wants an Excel file stored on a shared folder to be available to all user as either a shortcut, or a link in the public folders (can't post to a folder as he will be updating the sheet regularly). When a user clicks on the shortcut/link, it would just launch Excel and display the file. Anybody have any ideas...

Excel Opens Without Displaying Workbook
I am having issues with opening an Excel file. The file opens, but the workbook is not displayed. I tried the resolution in the article XL97: Excel Opens Without Displaying Workbook (http://support.microsoft.com/default.aspx?scid=kb;en-us;158996&Product=xlw97), but neither of the resolutions fixed the problem. Any suggestions?? Are you using Excel 97? -John Baughman Fort Collins, CO >-----Original Message----- >I am having issues with opening an Excel file. The file opens, but the workbook is not displayed. I tried the resolution in the article XL97: Excel Opens Without Di...

Invoice Numbers 10-27-07
We produce reports that are invoices.. The reports are really a group of compined reports if this matters... When we print the reports I would like to have printed consecutive invoice numbers. If possible I would like to have the number apprear as AS-00001, AS-00002 ect.. I am not really interested in storing the invoice numbers I just need them on the printed invoice as it is made of of groups of various data that is stored... Thank In Advance for you help. Bob If you just want a consequetive numbering on the report, all with an AS- prefix, see: Numbering Entries in a Report o...

View original Excel after saving over it
In error, i hit save instead of save as. I'd like to view the original documents contents. is this at all possible. i use windows xp. excel 2003 Not very likely. Try a Google search action if you haven't already, but I think it's impossible. This underscores the importance of backups. -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "houb" wrote: > In error, i hit save instead of save as. I'd like to view the original > documents contents. is this at all possible. i use windows xp. excel 2003 In article <C2A3F0E7-24E0-43A5-809A-ECA719...

printing imported gif files in Excel
When printing gif file with transparent background on the grey(25%) background of Excel non-transparent part of the picture has white border around it. Is there any way to prevent it? Thank you in advance... Tim ...

GP 10 AP Reconciliation Statement
Hi All, I have one query about the reconcile feature that is available in GP 10 to reconcile the AP and AR to GL. It has come to my notice when i take a recon statement for AP it does not match with the AP historical aged trail balance after taking into consideration the unmatched and potentially matched transactions. I have taken the AP smartlist for the given period and compared it with the transaction being displayed in the recon statement. What has come to my notice is the recon statement is not taking few transaction like invoice or payment for some reason. I faced this issue with almo...

ExCel programming
I am working on a spreadsheet for work where it will calculate commissions to be earned based on my sales. There is a table that I have to use to determine what the percentage would be, how would I write an equation for that. For example, the equation would have to say: if say D3 was = or < than %, use cell# whatever and then have a sum in there. The table is on another sheet in the document so that would have to be there too. Basically, the way that my commissions are calculated is that we have to take what I sold in any given month and find out what percentage of my yearly plan i...

VBA to put a copy of worksheet on the desktop 05-13-10
Hi all, In my workbook XYZ I have a sheet ABC. With a button on sheet DEF I can refresh sheet ABC. When the code finishes it job I want to add the actual date (short European notation dmyy) and time (f.i. 241110 16.31) to the name of the sheet (which becomes ABC 241110 16.31) and after that make a copy of that sheet in a separate workbook and put that workbook as an icon on the desktop of my computer. Is this possible? If so, please help me with the necessary code. Thanks in advance for your assistance. Jack Sons The Netherlands ...

Some Excel formatting functions taking a long time to work #2
Excel 2000 SP3 When I use some formatting functions for the first time in a session, such as bold, increasing font size etc, it takes up to 30 seconds to work. Meantime Excel is locked up until it completes that formatting call. I suspect faulty DLL? Has anyone experienced this? How to fix (other than a complete re- install) ? Any advice appreciated. Piri On Nov 5, 8:39=A0am, Piri <wiremu.pare...@hotmail.com> wrote: > Excel 2000 SP3 > When I use some formatting functions for the first time in a > session, such as bold, increasing font size etc, it takes =A0up to 30 > secon...

How to save Japanese characters in CSV format of Excel ?
Hi, I would like to know, how to save the Doubly-Byte characters.For example, Japanese in CSV of Excel.Here are the steps, I tried. 1. Open Excel 2. Copy pasted the Japanese charactesrs in a cell.It is displaying the characters correctly. 3. Save as CSV(Comma seperated file) It is saving as ??????. Thanks in advance for the info. ...

Macro
I need a macro that help me to transfer name and address information from an specific table in excel to a template in words on specific areas and then print the word document. The reason for this is that i need to create diferents letters to be sent to the customers from the excel table. Example of the table is: soc seg, customer name, child name, customer code, add 1 , add2, city, estate, zip code. all this information will be paste on word letter template on specific areas or fields. Any suggestion!!! -- nicoro Hi IMHO the best approach would be to set up a mail merge documen...

Excel fun patch
Excel fun patch, have you see it? http://www.conus.info ...

Excel 2003
Sometimes when I receive excel attachments in my email (outlook 2003) they have a row height of 409.5 when I open them. I have to highlight the whole sheet and change the row height before I am able to view the data. This does not happen all the time and not from any particular person. I can forward the email to another machine with excel 2003 and they open it with no problem. I have downloaded all the patches and updates that I can find and still no help. This is just an annoying quirk that is driving me nuts. Does anyone have any ideas? TIA How about a couple of silly guesses that might t...

Need macro help to close excel
I have created a button in Access2000 that opens an Excel Spreadsheet. What I need now is assit in closing excel upon completion. I can get an excel macro to save my file and close the worksheet, but it is not closing excel entirely. I'm on project with this employer and could use a response today to fix this before I leave. Thanks much to any and all. My macro is as follows: Sub SaveClose() ' ' SaveClose Macro ' Macro recorded 9/27/2004 by cdjohnso ' ' Keyboard Shortcut: Ctrl+Shift+C ' ChDir "I:\SchoolsSurvey\Graphs_Reports" ActiveWorkb...

Excel Text Function (Right, Left)
My sheet has columns like this A 1. 63mmx 4kg 2. 75mmx 4kg SWR How can i detect that if a1:a2 is right,3 "swr", that it should be returned 3 otherwise 6. How can i add =right function with conditional formula. Help me Rao Ratan singh Hi =IF(RIGHT(A1,"SWR"),3,6) fill down your column (move cursor over bottom right hand corner of the cell when you see a +, double click) -- Cheers JulieD check out www.hcts.net.au/tipsandtricks.htm ....well i'm working on it anyway "Rao Ratan Singh" <RaoRatanSingh@discussions.microsoft.com> wrote in message news:D...

copy chart from Excel to Powerpoint
I am trying to copy a chart from Excel to Powerpoint, but the button is grayed out and it won't let me copy it. You can convert the chart to a GIF (a picture) with my Excel Objects converter. http://www.geocities.com/excelmarksway "Hoffperson" wrote: > I am trying to copy a chart from Excel to Powerpoint, but the button is > grayed out and it won't let me copy it. ...

Updating External Links Excel 2000 vs 2002/2003
I have a situation where I'm using Excel 2000 with a workbook containing references to another workbook. When opening the first workbook & the second workbook is not available, you can say "no" to the update external links, and still see all values as they were when the first workbook was last closed. However, when the same workbook is opened in Excel 2002 or 2003, the external links specified only as a cell reference show the proper data (e.g, =wbkname!E1), but when they are Excel formulae (specifically a SUMIF), I'm getting a #VALUE! error in the pertinent cells Is th...

How do I disable the handicapped feature in Excel?
Someone in my office turned the handicapped feature on and now you have to hold the key down for a couple of seconds or the letter never appears. Does anyone know how to reverse this? Duh! Nevermind. Not an Excel problem. Control Panel - Handicapped feature. Thanks. "TIrish" wrote: > Someone in my office turned the handicapped feature on and now you have to > hold the key down for a couple of seconds or the letter never appears. Does > anyone know how to reverse this? ...

display in taskbar in excel 2000
Hello, Have a problem! I work with Office 2000 and excel does not open more than onw screen in the taskbar. Windows in Taskbar, I checked in Excel. Clustered display is turned off in the properties of the Taskbar. Can anyone help me with this problem prog, get it only if I 2x open excel. Regards Rob Hi Rob, I can't figure out what exactly what is happening in your excel but try this, Go to TOOLS (Menu Bar) then OPTIONS, in VIEW tab just CHECK the Windows in Taskbar. Hope this will help. ~jaeson ...

Excel 97 #13
How to spacing text in a cells dddd touch space bar kkkkk alt enter at the end of the line to break into two lines -- Don Guillett SalesAid Software donaldb@281.com "Tom" <anonymous@discussions.microsoft.com> wrote in message news:1689601c44803$0f6e5fd0$a401280a@phx.gbl... > How to spacing text in a cells ...

Excel 2007 Sheet Tabs
Hello, Please can you tell me how to display and hide the sheet tabs in excel 2007....knew how to do it in 2003 ... but cannot figure it out in 2007. Thanks Rob See my reply to your previous post in programming group. Regards, Shailesh Shah http://in.geocities.com/shahshaileshs/ (Free addins Excel Menu-2003 for Excel-2007) If You Can't Excel with Talent, Triumph with Effort. "Rob" <rob.lowein@gmail.com> wrote in message news:uOKdx3gyHHA.1188@TK2MSFTNGP04.phx.gbl... > Hello, > > Please can you tell me how to display and hide the sheet tabs in excel > ...