使用 Excel 给出雇佣期限时,获取雇员在特定生效日期的雇主身份

getting status of the employer for an employee on a particular effective date when duration of employment is given using Excel

Employee No. Employer Date_of_joining
123 adobe 22/03/2004
123 amazon 14/07/2010
123 adobe 04/04/2013
126 Ericsson 09/06/2004
126 Google 30/06/2010
126 Amazon 30/08/2019

基于上述 table ,我试图编写一个 excel 公式来填充以下 Table 中的值: 在第 1 行显示了员工 123

的一个示例
Employee No. 01/07/2010 01/07/2011 01/07/2012 01/07/2013 01/07/2014 01/07/2015
123 adobe amazon amazon adobe adobe adobe
126 - - - - - -

我关注的appproch如下:

如果从excel的角度来看,excel会先检查员工,然后检查生效日期是否小于入职日期,然后选择相应的雇主。

使用公式:

=IF(AND(匹配($C14,$A$2:$A$7,0)>0,D$13

但我知道我没有使用正确的逻辑,谦虚的请求帮助我!!

当您使用 Excel2010 时,您需要一些数组公式。试试下面-

=INDEX($B:$B,LARGE(IF(($A:$A=$A13)*($C:$C<=B),ROW($A:$A)-ROW($A),""),1))

CTRL+SHIFT+ENTER 计算公式,因为它是一个数组公式.