简体   繁体   English

如果 A 列包含搜索词,如何添加/替换 B 列中的值

[英]How do I add/replace a value in column B if column A contains the searched word

I want to do the following using Excel :我想使用 Excel 执行以下操作:

In column AX it have a long description, and I want to find the text 5.0-Rated.png from it, and then add 5.0 out of 5.0 stars to column AY which currently have the values of 0.AX列中,它有很长的描述,我想从中找到文本5.0-Rated.png ,然后将5.0 out of 5.0 stars添加到AY列,当前值为 0。

I want to add that to the whole column.我想将其添加到整个专栏中。

Thanks.谢谢。

This should do the trick, place in AY1 and drag down as you like这应该可以解决问题,放置在AY1并根据需要向下拖动

=MID(AX1,SEARCH("?.?-rated.png",AX1),3)&" out of 5.0 stars"


Note: it will throw a #VALUE! 注意:它会抛出一个#VALUE! error if there is no such filename in the string. 如果字符串中没有这样的文件名,则会出错。 You can avoid that by wrapping the whole formula in an IFERROR function like this: 您可以通过将整个公式包装在一个IFERROR函数中来避免这种情况,如下所示:

 =IFERROR(MID(AX1,SEARCH("?.?-rated.png",AX1),3)&" out of 5.0 stars","")


Working like so: 像这样工作:
在此处输入图片说明

暂无
暂无

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

相关问题 如果A列包含x AND B列包含y然后添加值 - If column A contains x AND column B contains y THEN add value 如果A列包含“ D列”且B列包含“ E列”,则添加值 - If column A contains “column D” AND column B contains “column E” THEN add value Excel VBA-如果列B包含任何值,则使用值更新列A。 如果列B不包含任何值,则不要运行宏 - Excel VBA - Update column A with a value if column B contains any value. If column B contains no values then do not run the macro 在Excel中,如何使一列采用非A的列A的值,否则采用B列的值? - In Excel, how do I make a column take on the value of column A if it's not NA and otherwise take on the value of column B? 如何使多个包含序列的文本过滤器自动化并将文本值添加到右侧的列中? - How Do I Automate Multiple Text Filter Contains Sequences and Add The Text Value To The Column To The Right? Excel VBA-如果B列中的单元格包含一个值,则A列等于“值”,但不要覆盖现有的A列数据 - Excel VBA - If a cell in column B contains a value then column A equals “value” BUT do not overwrite existing column A data Excel VBA如果B列包含一个值,然后将该值复制到A列,则不会覆盖现有的A列数据 - Excel VBA if Column B contains a value then copy that value to Column A do not overwrite existing Column A data 替换 B 列中的值 - Replace the value present in column B VBA如果A列中的值然后在B列中替换 - VBA if value in column A then replace in column B 如果B列的单元格值包含A单元格值 - If column B cell value contains A cell value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM