Hi All, found this site when searching for the answer to an excel problem I am facing.
We need to track the number of days per calendar year an expat stays in this location and am trying to build a spreadsheet to track these days accurately from just entering arrival and leaving dates per employee.
The difficulty is twofold:
1 - Where the period spans a Year End ie. Arrives 31 Oct 2011 and Leaves 15 Feb 2012...how to get the formulae to count the days in that range relative to each year (see below screenshots)
2 - There always will be a cell not yet completed if the employee is still here so the days column uses the today() function to calculate but how to include this into my formulae for totalling per year, I think it is causing a problem also since there is no date in cell C8 on first screenshot.
Any ideas anyone? Am hoping someone can quickly drop on that Eureka formula that will solve all my problems.....well my excel ones anyway
Thanks,
Iain
****, I cannot seem to post the screenshots, let me see if I can type below (hope this comes out)
Example Form:
[TABLE="width: 507"]
<TBODY>[TR]
[TD]Employee Name[/TD]
[TD]Arrived[/TD]
[TD]Left[/TD]
[TD]Stayed[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]1-May-11[/TD]
[TD]15-Jul-11[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]4-Aug-11[/TD]
[TD]3-Oct-11[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]6-Oct-11[/TD]
[TD]13-Feb-12[/TD]
[TD]130[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]16-Feb-12[/TD]
[TD][/TD]
[TD]142[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL><COL></COLGROUP>[/TABLE]
Formulae to calculate days (I know this is working wrong though
as noted in scenario 1)
[TABLE="width: 553"]
<TBODY>[TR]
[TD][/TD]
[TD]1-Jan-07[/TD]
[TD]1-Jan-08[/TD]
[TD]1-Jan-09[/TD]
[TD]1-Jan-10[/TD]
[TD]1-Jan-11[/TD]
[TD]1-Jan-12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]31-Dec-07[/TD]
[TD]31-Dec-08[/TD]
[TD]31-Dec-09[/TD]
[TD]31-Dec-10[/TD]
[TD]31-Dec-11[/TD]
[TD]31-Dec-12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2007[/TD]
[TD]2008[/TD]
[TD]2009[/TD]
[TD]2010[/TD]
[TD]2011[/TD]
[TD]2012[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Days per year[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]117[/TD]
[TD]0[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL span=2><COL><COL><COL></COLGROUP>[/TABLE]
Actual Formula:
[TABLE="width: 459"]
<TBODY>[TR]
[TD]=SUMIFS($D$5:$D$119,$C$5:$C$119,"<="&K$3,$B$5:$B$119,">="&K$2)[/TD]
[/TR]
</TBODY><COLGROUP><COL></COLGROUP>[/TABLE]
where D5:D119 = No of Days column
B5:B119 = Arrival Dates and K3 is 31st Dec each year
C5:C119 = Arrival Dates and K3 is 31st Dec each year
Any ideas? Am totally stuck
We need to track the number of days per calendar year an expat stays in this location and am trying to build a spreadsheet to track these days accurately from just entering arrival and leaving dates per employee.
The difficulty is twofold:
1 - Where the period spans a Year End ie. Arrives 31 Oct 2011 and Leaves 15 Feb 2012...how to get the formulae to count the days in that range relative to each year (see below screenshots)
2 - There always will be a cell not yet completed if the employee is still here so the days column uses the today() function to calculate but how to include this into my formulae for totalling per year, I think it is causing a problem also since there is no date in cell C8 on first screenshot.
Any ideas anyone? Am hoping someone can quickly drop on that Eureka formula that will solve all my problems.....well my excel ones anyway
Thanks,
Iain
****, I cannot seem to post the screenshots, let me see if I can type below (hope this comes out)
Example Form:
[TABLE="width: 507"]
<TBODY>[TR]
[TD]Employee Name[/TD]
[TD]Arrived[/TD]
[TD]Left[/TD]
[TD]Stayed[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]1-May-11[/TD]
[TD]15-Jul-11[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]4-Aug-11[/TD]
[TD]3-Oct-11[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]6-Oct-11[/TD]
[TD]13-Feb-12[/TD]
[TD]130[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD]16-Feb-12[/TD]
[TD][/TD]
[TD]142[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Mr ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL><COL></COLGROUP>[/TABLE]
Formulae to calculate days (I know this is working wrong though
as noted in scenario 1)
[TABLE="width: 553"]
<TBODY>[TR]
[TD][/TD]
[TD]1-Jan-07[/TD]
[TD]1-Jan-08[/TD]
[TD]1-Jan-09[/TD]
[TD]1-Jan-10[/TD]
[TD]1-Jan-11[/TD]
[TD]1-Jan-12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]31-Dec-07[/TD]
[TD]31-Dec-08[/TD]
[TD]31-Dec-09[/TD]
[TD]31-Dec-10[/TD]
[TD]31-Dec-11[/TD]
[TD]31-Dec-12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2007[/TD]
[TD]2008[/TD]
[TD]2009[/TD]
[TD]2010[/TD]
[TD]2011[/TD]
[TD]2012[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Days per year[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]117[/TD]
[TD]0[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL span=2><COL><COL><COL></COLGROUP>[/TABLE]
Actual Formula:
[TABLE="width: 459"]
<TBODY>[TR]
[TD]=SUMIFS($D$5:$D$119,$C$5:$C$119,"<="&K$3,$B$5:$B$119,">="&K$2)[/TD]
[/TR]
</TBODY><COLGROUP><COL></COLGROUP>[/TABLE]
where D5:D119 = No of Days column
B5:B119 = Arrival Dates and K3 is 31st Dec each year
C5:C119 = Arrival Dates and K3 is 31st Dec each year
Any ideas? Am totally stuck