我在F列中有104个值的下拉列表。我想如果从该列表中选择了任何值,则应从工作表中引用一个相应的值,并将其插入第i列中的单元格。
如果在工作表1列F中选择了一个值,则该值应与工作表2列A中的相似值匹配,并在工作表2列B中选择对应的值,然后返回并插入工作表1列i中。
请注意,F列中的104个值中的每个值都来自另一个工作表的单元格地址中的相应值
=IF(TRIM(F5)='Asset Dropdown List'!A1,'Compensation Rate'!D5,IF(TRIM(F5)='Asset Dropdown List'!A2,'Compensation Rate'!C5,IF(TRIM(F5)='Asset Dropdown List'!A3,'Compensation Rate'!B5,IF(TRIM(F5)='Asset Dropdown List'!A4,'Compensation Rate'!D6,IF(TRIM(F5)='Asset Dropdown List'!A5,'Compensation Rate'!C6,IF(TRIM(F5)='Asset Dropdown List'!A6,'Compensation Rate'!B6,IF(TRIM(F5)='Asset Dropdown List'!A7,'Compensation Rate'!D7,IF(TRIM(F5)='Asset Dropdown List'!A8,'Compensation Rate'!C7,IF(TRIM(F5)='Asset Dropdown List'!A9,'Compensation Rate'!B7,IF(TRIM(F5)='Asset Dropdown List'!A10,'Compensation Rate'!D8,IF(TRIM(F5)='Asset Dropdown List'!A11,'Compensation Rate'!C8,IF(TRIM(F5)='Asset Dropdown List'!A12,'Compensation Rate'!B8,IF(TRIM(F5)='Asset Dropdown List'!A13,'Compensation Rate'!D9,IF(TRIM(F5)='Asset Dropdown List'!A14,'Compensation Rate'!C9,IF(TRIM(F5)='Asset Dropdown List'!A15,'Compensation Rate'!B9,IF(TRIM(F5)='Asset Dropdown List'!A16,'Compensation Rate'!D10,IF(TRIM(F5)='Asset Dropdown List'!A17,'Compensation Rate'!C10,IF(TRIM(F5)='Asset Dropdown List'!A18,'Compensation Rate'!B10,IF(TRIM(F5)='Asset Dropdown List'!A19,'Compensation Rate'!D11,IF(TRIM(F5)='Asset Dropdown List'!A20,'Compensation Rate'!C11,IF(TRIM(F5)='Asset Dropdown List'!A21,'Compensation Rate'!B11,IF(TRIM(F5)='Asset Dropdown List'!A22,'Compensation Rate'!D12,IF(TRIM(F5)='Asset Dropdown List'!A23,'Compensation Rate'!C12,IF(TRIM(F5)='Asset Dropdown List'!A24,'Compensation Rate'!B12,IF(TRIM(F5)='Asset Dropdown List'!A25,'Compensation Rate'!D13,IF(TRIM(F5)='Asset Dropdown List'!A26,'Compensation Rate'!C13,IF(TRIM(F5)='Asset Dropdown List'!A27,'Compensation Rate'!B13,IF(TRIM(F5)='Asset Dropdown List'!A28,'Compensation Rate'!D14,IF(TRIM(F5)='Asset Dropdown List'!A29,'Compensation Rate'!C14,IF(TRIM(F5)='Asset Dropdown List'!A30,'Compensation Rate'!B14,IF(TRIM(F5)='Asset Dropdown List'!A31,'Compensation Rate'!D15,IF(TRIM(F5)='Asset Dropdown List'!A32,'Compensation Rate'!C15,IF(TRIM(F5)='Asset Dropdown List'!A33,'Compensation Rate'!B15,IF(TRIM(F5)='Asset Dropdown List'!A34,'Compensation Rate'!D16,IF(TRIM(F5)='Asset Dropdown List'!A35,'Compensation Rate'!C16,IF(TRIM(F5)='Asset Dropdown List'!A36,'Compensation Rate'!B16,IF(TRIM(F5)='Asset Dropdown List'!A37,'Compensation Rate'!D17,IF(TRIM(F5)='Asset Dropdown List'!A38,'Compensation Rate'!C17,IF(TRIM(F5)='Asset Dropdown List'!A39,'Compensation Rate'!B17,IF(TRIM(F5)='Asset Dropdown List'!A40,'Compensation Rate'!D18,IF(TRIM(F5)='Asset Dropdown List'!A41,'Compensation Rate'!C18,IF(TRIM(F5)='Asset Dropdown List'!A42,'Compensation Rate'!B18,IF(TRIM(F5)='Asset Dropdown List'!A43,'Compensation Rate'!D19,IF(TRIM(F5)='Asset Dropdown List'!A44,'Compensation Rate'!C19,IF(TRIM(F5)='Asset Dropdown List'!A45,'Compensation Rate'!B19,IF(TRIM(F5)='Asset Dropdown List'!A46,'Compensation Rate'!D20,IF(TRIM(F5)='Asset Dropdown List'!A47,'Compensation Rate'!C20,IF(TRIM(F5)='Asset Dropdown List'!A48,'Compensation Rate'!B20,IF(TRIM(F5)='Asset Dropdown List'!A49,'Compensation Rate'!D21,IF(TRIM(F5)='Asset Dropdown List'!A50,'Compensation Rate'!C21,IF(TRIM(F5)='Asset Dropdown List'!A51,'Compensation Rate'!B21,IF(TRIM(F5)='Asset Dropdown List'!A52,'Compensation Rate'!D22,IF(TRIM(F5)='Asset Dropdown List'!A53,'Compensation Rate'!C22,IF(TRIM(F5)='Asset Dropdown List'!A54,'Compensation Rate'!B22,IF(TRIM(F5)='Asset Dropdown List'!A55,'Compensation Rate'!D23,IF(TRIM(F5)='Asset Dropdown List'!A56,'Compensation Rate'!C23,IF(TRIM(F5)='Asset Dropdown List'!A57,'Compensation Rate'!B23,IF(TRIM(F5)='Asset Dropdown List'!A58,'Compensation Rate'!D26,IF(TRIM(F5)='Asset Dropdown List'!A59,'Compensation Rate'!C6,IF(TRIM(F5)='Asset Dropdown List'!A60,'Compensation Rate'!B26,IF(TRIM(F5)='Asset Dropdown List'!A61,'Compensation Rate'!D27,IF(TRIM(F5)='Asset Dropdown List'!A62,'Compensation Rate'!C27,IF(TRIM(F5)='Asset Dropdown List'!A63,'Compensation Rate'!B27,IF(TRIM(F5)='Asset Dropdown List'!A64,'Compensation Rate'!D28,2))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
答案 0 :(得分:2)
现在有一个 IFS函数,可以用一个函数替换多个嵌套的IF语句。因此,我们没有最初的成绩示例,而是有4个嵌套的IF函数:
= IF(D2> 89,“ A”,IF(D2> 79,“ B”,IF(D2> 69,“ C”,IF(D2> 59,“ D”,“ F”)))) )
使用单个IFS函数可以使其变得更加简单:
= IFS(D2> 89,“ A”,D2> 79,“ B”,D2> 69,“ C”,D2> 59,“ D”,TRUE,“ F”)