EXCEL IF 多層條件的上限

2015-06-30 2:58 am
各位大大 您們好:

小弟有問題想請教,我有一個 IF 多重條件如下,但似乎已經超過EXCEL IF 7層條件的上限,請問有沒有其他解套的方式? 感蝦~


=IF(FIND("E-I",C16),"A廚",IF(FIND("E",C16)," B廚",IF(FIND("H",C16)," C廚",IF(FIND("H-M"," D廚",IF(FIND("G-K",C16)," E廚",IF(FIND("G",C16)," F廚",IF(FIND("F-J",C16)," G廚",IF(FIND("F",C16)," H廚"," I廚"))))))))

回答 (7)

2015-07-05 1:57 am
✔ 最佳答案
可以用 Select Case 語句進行多條件判斷
多條件格式是
if 條件1 then
語句一
elseif 條件2 then
語句二
elseif 條件3 then
語句三
。。。。。。
endif


之前有人問過,
建議你去看看~
應該可以幫到你!

參考資料:
http://www.comingzoo.com
(網址為: coming zoo.com(中間不要空格)
2015-07-05 5:24 am
CHAR(數字)
傳回 "數字代碼" 所對應的字元
就是 ASC II 的十進位碼

例如
CHAR(65) 是 A
CHAR(66) 是 B
...
CHAR(73) 是 I
2015-07-03 7:53 am
感謝 Daniel 及KK 兩位 大師鼎力相助,想請問Daniel 大師,可否解釋下您的方法
CHAR(74-MATCH(9^9,
小弟未曾學過該方式,還請大師指點~

感謝~
2015-07-01 5:08 am
=LOOKUP(,0/FIND({"","F","F-J","G","G-K","H","H-M","E","E-I"},C16),

2015-06-30 21:08:38 補充:
接上式
{"I","H","G","F","E","C","D","B","A"})&"廚"

2015-07-01 09:22:53 補充:
注意 "H-M","H" 與3樓的排列順序不同

2015-07-02 09:09:01 補充:
D大的 MID + MATCH 配合的好
版主好像不在了,請D大上答
2015-06-30 6:31 pm
=CHAR(74-MATCH(9^9,FIND({"","F","F-J","G","G-K","H-M","H","E","E-I"},C16)))&"廚"

試試看!

2015-07-02 08:52:22 補充:
003依版大的順序去改的,但不管是H或H-M,都會先判斷成C廚,若是版大筆誤,將H-M改為C廚,H改為D廚,則003應改為:

=CHAR(74-MATCH(9^9,FIND({"","F","F-J","G","G-K","H","H-M","E","E-I"},C16)))&"廚"

否則就要改為K大的方式

2015-07-02 08:52:37 補充:
或寫為:

=MID("IHGFECDBA",MATCH(,0/FIND({"","F","F-J","G","G-K","H","H-M","E","E-I"},C6)),1)&"廚"
2015-06-30 6:37 am
在其他地方做一個清單
然後用VLOOKUP去搜尋
2015-06-30 3:41 am
是否可把一格七條件式,拆成多格輔助欄位IF,最後再組合起來.


收錄日期: 2021-05-04 01:57:35
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20150629000016KK05924

檢視 Wayback Machine 備份