FTE formula for start/end date but based 3 selectable statuses

fussy_p

New Member
Joined
Nov 27, 2023
Messages
3
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi everyone, and thanks in advance.

Looking for a formula that depending on the status selected (3 statuses available), calculates an employees FTE (0 to 1.0).

3 statuses are Active, Terminated and LOA (Leave of Absence).

Format shown below:

1701085183136.png


Let me know if I've missed anything critical here.

Thank-you!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi, I have. Wanted to reply to you yesterday but i got some problems using BB code. (I'm new to this).
First I wanted to ask you: do you need the status cells?
Because if you don't have termination date every you know that you have to calculate FTE.
If you have a termination date, the days after the termination date are not added.
If you have a LOA Start and End date, the days that are part of LOA are not added.
If you do this, you wont need the status.

For every month i added the total days that within the "Hire Date - Terminate Date" time span, not considering those that fall between the LOA start and end dates, and dividing this number of "worked days" by the total number of days in the month. I'm not sure if that is correct, or if you want to just consider working days, for example from monday to friday. If this is the case we would have to make some minor changes.

I'll pase my BB code here. And i'll add manually the named ranges used:
If you are in the cell H5:
CurrentMonth: =MONTH(Hoja1!H$4)
DaysInMonth: =EDATE(Hoja1!H$4,1)-Hoja1!H$4
HireDate: =Hoja1!$C5
LoaEndDate: =Hoja1!$F5
LoaStartDate: =Hoja1!$E5
TerminateDate: =IF(Hoja1!$D5=0,1000000,Hoja1!$D5)

Let me know if that is what you need or if we need to make some changes.

FTE.xlsx
CDEFGHIJKLMNOPQRS
4Hire dateTerminate dateLOA start dateLOA end dateStatusene-24feb-24mar-24abr-24may-24jun-24jul-24ago-24sep-24oct-24nov-24dic-24
52022-08-08Active111111111111
62022-08-082024-04-15Terminated1110,500000000
72022-08-082023-09-152024-09-14LOA000000000,53333333111
Hoja1
Cell Formulas
RangeFormula
H5:S7H5=SUM(LET(days,SEQUENCE(31,,H$4,1),(MONTH(days)=CurrentMonth)*(days>=HireDate)*(days<=TerminateDate)*(NOT((days<=LoaEndDate)*(days>=LoaStartDate))))*1)/DaysInMonth
Cells with Data Validation
CellAllowCriteria
G5:G7ListActive;Terminated;LOA
 
Upvote 0
In case you need the calculation with working days from monday to friday

Named ranges (in cell H5):
CurrentMonth: =MONTH(Hoja1!H$4)
DaysInMonth: =NETWORKDAYS(Hoja1!C$4,EOMONTH(Hoja1!C$4,0))
HireDate: =Hoja1!$C5
LoaEndDate: =Hoja1!$F5
LoaStartDate: =Hoja1!$E5
TerminateDate: =IF(Hoja1!$D5=0,1000000,Hoja1!$D5)

FTE - Working days.xlsx
CDEFGHIJKLMNOPQRS
4Hire dateTerminate dateLOA start dateLOA end dateStatusene-24feb-24mar-24abr-24may-24jun-24jul-24ago-24sep-24oct-24nov-24dic-24
52022-08-08Active111111111111
62022-08-082024-04-15Terminated1110,500000000
72022-08-082023-09-152024-09-14LOA000000000,52380952111
Hoja1
Cell Formulas
RangeFormula
H5:S7H5=SUM(LET(days,SEQUENCE(31,,H$4,1),(MONTH(days)=CurrentMonth)*(NETWORKDAYS(days,days))*(days>=HireDate)*(days<=TerminateDate)*(NOT((days<=LoaEndDate)*(days>=LoaStartDate))))*1)/DaysInMonth
Cells with Data Validation
CellAllowCriteria
G5:G7ListActive;Terminated;LOA
 
Upvote 0
I changed the relative named ranges to variables in the LET function. It is the same calculation with the working days:

FTE - Working days.xlsx
CDEFGHIJKLMNOPQRS
4Hire dateTerminate dateLOA start dateLOA end dateStatusene-24feb-24mar-24abr-24may-24jun-24jul-24ago-24sep-24oct-24nov-24dic-24
52022-08-08Active111111111111
62022-08-082024-04-15Terminated1110,500000000
72022-08-082023-09-152024-09-14LOA000000000,52380952111
Hoja1
Cell Formulas
RangeFormula
H5:S7H5=LET( days,SEQUENCE(31,,H$4,1), HireDate,$C5, TerminateDate,IF(Hoja1!$D5=0,1000000,Hoja1!$D5), LoaStartDate,$E5, LoaEndDate,$F5, CurrentMonth,MONTH(H$4), DaysInMonth,NETWORKDAYS(Hoja1!H$4,EOMONTH(Hoja1!H$4,0)), SUM((MONTH(days)=CurrentMonth)*(NETWORKDAYS(days,days))*(days>=HireDate)*(days<=TerminateDate)*NOT((days<=LoaEndDate)*(days>=LoaStartDate)))/DaysInMonth )
Cells with Data Validation
CellAllowCriteria
G5:G7ListActive;Terminated;LOA
 
Upvote 0
Thank you! I didn't realise this would be so complex that code was involved! Is there a workbook you could share with me so I could look at how you've implemented this and how to incorporate the code?
 
Upvote 0
Here is a link to download the file:
FTE - Working days.zip

Though you should be able to copy the code here:
XL2BB.png


And paste it in excel page and it should work (that is, if you are using the english version).

It is not VBA programming. It is a LET function which lets you define variables.

Let me know if you can download or copy paste the BB code correctly.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,680
Members
449,116
Latest member
HypnoFant

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top