How to remove a particular word in an Excel cell?

拈花ヽ惹草 提交于 2019-12-22 14:07:01

问题


How do you remove a particular word in a column of one cell that's in another cell in Excel.

Example: if

  • A1 = *1603 Ad street New York*,
  • B1 = *New York*
  • then in C1 I want = *1603 Ad street*

回答1:


Use the Substitute function:

=SUBSTITUTE(A1,B1,"")

EDIT: Per brettdj's suggestion, added TRIM to get rid of leading or trailing spaces:

=TRIM(SUBSTITUTE(A1,B1,""))



回答2:


Just use the Replace function. leave " replace with" blank




回答3:


Try this formula for range of words:

=TRIM(SUBSTITUTE(A1,INDEX($B$1:$B$56,IF(ISNA(MATCH(FALSE,ISERR(FIND($B$1:$B$56,A1)),FALSE)),0,MATCH(FALSE,ISERR(FIND($B$1:$B$56,A1)),FALSE)),1),""))


来源:https://stackoverflow.com/questions/6209509/how-to-remove-a-particular-word-in-an-excel-cell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!