可以用vlookup查询建立的值对应表。这张对应表可以是你原来的数据,如$O$5:$P$7的数据源,也可以手工定义{"A","B";"C","D";"E","F"},公式=VLOOKUP(F5,$O$5:$P$7,2,0),和=VLOOKUP(F5,{"A","B";"C","D";"E","F"},2,0)
在单元格中输入以下公式=VLOOKUP(F5,{"A","B";"C","D";"E","F";"X","Y"},2,0)
=VLOOKUP(F5,$O:$P,2,)