[英]How to replace the value of one cell with another based on whether a word exists in a specific cell
I have a basic question.我有一个基本问题。 I have a one column which represents a quantity.
我有一列代表一个数量。 The cell to the right is a new column that will contain a word.
右边的单元格是将包含一个词的新列。 I want to search cells in one column for the word and if it appears replace the word, let's say "foil" with the value of the cell to the left.
我想在一列的单元格中搜索单词,如果它出现替换单词,让我们说“foil”与左边单元格的值。 A2 represents the cell A2, and I am checking B2.
A2代表A2单元格,我勾选的是B2。 This formula is not working.
这个公式不起作用。 I want the value of cell A2, not literally "A2"
我想要单元格 A2 的值,而不是字面上的“A2”
=IFERROR(IF(SEARCH("*foil*",B2,1),"A2"),"0")
Thank you so much for your help.非常感谢你的帮助。 I really appreciate any and all help with this.
我真的很感谢所有的帮助。
While you are using SEARCH()
function you do not need to use wild card
.当您使用
SEARCH()
function 时,您不需要使用wild card
。 Remove double quote from "A2"
so that formula can show data of A2
cell instead of text A2
.从
"A2"
中删除双引号,以便公式可以显示A2
单元格的数据而不是文本A2
。 See below...见下文...
=IFERROR(IF(SEARCH("Foil",B2,1),A2),0)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.