我不知道lookup http://www.techonthenet.com/excel/formulas/lookup.php由于多个参数,这是正确的公式。或许hlookup http://www.techonthenet.com/excel/formulas/lookup.php or vlookup http://www.techonthenet.com/excel/formulas/vlookup.php但这些需要您有值表。一个简单的嵌套系列if http://www.techonthenet.com/excel/formulas/if.php对于小样本量来说是有效的
Try
=IF(A1="a","pickup",IF(A1="b","collect",IF(A1="c","prepaid","")))
现在合并您的left
争论
=IF(LEFT(A1,1)="a","pickup",IF(LEFT(A1,1)="b","collect",IF(LEFT(A1,1)="c","prepaid","")))
另请注意您的用法left http://www.techonthenet.com/excel/formulas/left.php,您的参数不指定字符数,而是指定字符集。
2015 年 7 月 8 日 - 有关上述功能的 Microsoft 知识库文章。我不认为有什么wrong with techonthenet
,但我宁愿链接到官方来源。
- lookup https://support.office.com/en-ca/article/LOOKUP-function-446d94af-663b-451d-8251-369d5e3864cb
- hlookup https://support.office.com/en-ca/article/HLOOKUP-function-a3034eec-b719-4ba3-bb65-e1ad662ed95f
- vlookup https://support.office.com/en-ca/article/VLOOKUP-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1
- if https://support.office.com/en-ca/article/IF-function-69aed7c9-4e8a-4755-a9bc-aa8bbff73be2
- left https://support.office.com/en-za/article/LEFT-LEFTB-functions-9203d2d2-7960-479b-84c6-1ea52b99640c