gpt4 book ai didi

Excel 多个 if 语句有超过 2 个答案

转载 作者:行者123 更新时间:2023-12-04 21:33:00 25 4
gpt4 key购买 nike

试图让一个 excel 电子表格来做我需要的事情,而我基本上是电脑文盲。任何帮助,将不胜感激
基本上我需要的是以下语句的组合

If E8 = Officer and G8 = Active Duty then 1
If E8 = Officer and G8 = Active Reserve then 2
if E8 = Enlisted and G8 = Active Duty then 3
If E8 = Enlisted and G8 = Active Reserve then 4

我已经能够弄清楚一些基本的 if 语句,但是这个具有多个结果的语句让我陷入了一个循环,如果可能的话,所有这些都需要进入一个单元格。多谢你们

最佳答案

=MATCH(E8&G8,{"OfficerActive Duty","OfficerActive Reserve","EnlistedActive Duty","EnlistedActive Reserve"},0)

或者
=(MATCH(E8,{"Officer","Enlisted"},0)-1)*2+MATCH(G8,{"Active Duty","Active Reserve"},0)

关于Excel 多个 if 语句有超过 2 个答案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46697062/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com