我有一张excelsheet,其中包含来自单元格D8的下拉回答,以及来自D的下拉回答。选项为“中”,“高”和“非常高”。我试图找到一种方法来做到以下几点:
1)如果D8是中等,则将单元格N8留空 2)如果D8为高则 在N8中写不相关的 3)如果D8非常高,则写“呼叫人” 在phoneXXX“in N8
我试过使用普通的IF语句,但是如果D8是中等的话我找不到让单元格为空的方法,所以我觉得privatesub是要走的路。
答案 0 :(得分:0)
类似的东西:
=IF(D8="Medium","",IF(D8="High","irrelevant",IF(D8="Very High","Call person on phoneXXX","none of the above")))
答案 1 :(得分:0)
您可以将MATCH与INDEX或CHOOSE结合使用:
Dim item As NotesItem
OR
=IFERROR(INDEX({"","Irrelevant","Call Person on phoneXXX"},MATCH(LEFT(N8),{"M","H","V"},0)),"Not Listed")
另一种选择,如果你有Office 365 Excel是IFS():
=IFERROR(CHOOSE(MATCH(LEFT(N8),{"M","H","V"},0),"","Irrelevant","Call Person on phoneXXX"),"Not Listed)