将vlookup用于具有多个if语句的另一个工作表

时间:2018-07-16 20:41:23

标签: excel if-statement google-sheets ifs

Name    Contractor  Maintain   On Payroll  Salary 
Ben     N   Y   Y   £87
Drew    N   N   Y   £48
Maria   N   Y   Y   £65
Martin  N   N   Y   £62
Lucy    N   N   N   £38
Andy    N   N   N   £65
Chris   N   Y   N   £80

我在Sheet1中有以上信息。

我想做一个vlookup,它使用Sheet1的所有名称,然后根据以下条件根据各种条件:

If payroll now
      If not going to be on payroll, salary goes to 0 in 1 month, else stay on payroll
If not on payroll now
      If not going to be on payroll, stay at 0, else start on payroll in 3 months from today

在Sheet2中,我使用:

=IMPORTRANGE("Linktosheet","Sheet1!A2:F37") 

获得薪水数字以外的所有信息。

然后我创建所有逻辑,工作表2应该看起来像(当前日期是18年7月16日):

                    July '18  Aug '18  Sep '18 Oct '18
Ben     N   Y   Y   £87       £87      £87     £87   
Drew    N   N   Y   £48       £48      0       0 
Maria   N   Y   Y   £65       65       65      65
Martin  N   N   Y   £62       62 .     0 .     0
Lucy    N   N   N   0 .       0 .      0 .     0 
Andy    N   N   N   0 .       0 .      0 .     0
Chris   N   Y   N   0 .       0  .     0 .     80

假设当前日期是18年7月。

由于某些原因,使用多个IF语句时,我执行vlookup时,数组公式vlookup会拾取完全错误的数字,并且所有公式都匹配到Google表格上的正确位置。知道出了什么问题吗?

0 个答案:

没有答案