简体   繁体   English

Excel 用于根据表的第一列检查单元格中的文本值并返回表第二列中的值的公式

[英]Excel formula to check a text value from a cell against table's first column and return a value from the table second column

excel formula: Formula in column B (cell B1, B2, ...) must check if a word from C1:C4 is used in A1 and return a corresponding value from D1:D4. excel 公式:B 列(单元格 B1、B2、...)中的公式必须检查 A1 中是否使用了 C1:C4 中的单词,并返回 D1:D4 中的相应值。

In result, the column B should look like below.结果,B 列应如下所示。 This is an example of input data and results in the column B.这是 B 列中输入数据和结果的示例。

A一种 B C C D
Go 2 steps Go 2个步骤 M Jump J
Turn left转左 T Go Go M
Jump fence跳围栏 J Turn转动 T
Run forward向前跑 M Run跑步 M
Turn around回转 T
Go 5 steps Go 5个步骤 M

I have done that some time ago using INDEX, MATCH AND VLOOKUP or HLOOKUP but can't find it any-more.前段时间我使用 INDEX、MATCH AND VLOOKUP 或 HLOOKUP 做到了这一点,但再也找不到了。 I remember that it took me long time to make it work.我记得我花了很长时间才让它发挥作用。 If a cell in column A is empty, corresponding cell in column B stays clear.如果 A 列中的单元格为空,则 B 列中的相应单元格保持空白。

You can use the LOOKUP() function to accomplish the desired output in column B您可以使用LOOKUP() function 来完成B列中所需的 output

在此处输入图像描述

• Formula used in cell B1 • 单元格B1中使用的公式

=LOOKUP(2,1/(SEARCH($C$1:$C$4,A1)),$D$1:$D$4)

And Fill Down for the rest of the cells.并向下填充 rest 的单元格。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 给定Excel中的值列表中的值,如何从第一列/行返回相应的值 - Given a value in an table of values in Excel, how to return the corresponding value from the first column/row Excel 公式检查行中最后一个非零值并从相应列中获取单元格值 - Excel formula to check the last non zero value in row and bring cell value from corresponding column 从3列中返回最大值的公式,但如果该列的标题出现在另一个单元格的文本中,则仅包含该列 - Formula to return the maximum value from 3 columns, but only include a column if the column if the heading appears in a text in another cell 如果值以公式开头,则 Excel 从列中复制单元格 - Excel copy cell from a column if value is starting with Formula Excel公式匹配A列中的值,并且不返回空白列B - Excel formula match value in column A and return not blank cell column B Excel如何在表中查找值并从另一个单元格返回值 - Excel how to look for value in table and return value from another cell Excel公式基于B列中的相对像元值返回A列中的像元值 - Excel formula to return value of cell in column A based off the relative cell value in column B excel-我需要从a列匹配be列的值,并在与b列相邻的单元格中返回一个值 - excel - i need to take a value from column a match to column be and return a value in a cell adjacent to column b Excel:检查列中单个单元格的部分匹配 - Excel: Check for partial matches from column against single cell Excel:在表中查找匹配的单元格并返回该行中第一个单元格的值 - Excel: Lookup matching cell in a table and return the value of the first cell in the row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM