根据excel中的列值获取某列的内容

Get the content of a column based on the column value in excel

通过检查答案栏中的值,它应该 return 来自该栏的内容 这里的答案是 C 所以它应该从 C 列得到 Delhi 并把它放在输出列


样本

正如 Davesexcel 所说,HLOOKUP 似乎可以工作。

这是一个 Google Sheet 使用 HLOOKUP 的公式,该公式也适用于 Excel:https://docs.google.com/spreadsheets/d/1LaCqkcLpgiQ1cYZEUBSSYbJkOaht1A34Af1MlZJwIc0/edit?usp=sharing.

我举的公式是:

=hlookup(F2,B1:E2,row())

您可以使用 Index(), Match() 组合,比 Vlookup(), HLookup() 更好。

=INDEX(B2:E2,,MATCH(F2,B1:E1,0))