0
votes

I have a list of employees where I've generated an employee number based on the Hire Date value.

I was hoping to be able to calculate which employees have been employed the longest using the hire date and incrementing by one only if the Active column is true. I'm struggling to determine a formula that will intelligently determine who has been employed from the longest to the shortest

You can see a list of these dates here: https://docs.google.com/spreadsheets/d/1ogjWzFPWLUECIP9YXL-r7RHM-hPWTPZ-6wX0sTV0QNc/edit?usp=sharing

1

1 Answers

1
votes

try:

=ARRAYFORMULA(QUERY({A2:C, TODAY()-B2:B}, 
 "select Col3,Col4 where Col1 = TRUE order by Col4 desc"))

where E column are Employees and F column are days

enter image description here