简体   繁体   English

如何将单元格文本与包含Excel中已有文本的另一个单元格合并?

[英]How to join a cell text with another cell that contains text already in excel?

Here is what im trying to do. 这是我正在尝试做的事情。 Lets say I have cell A2 that contains text "Hello world" and cell A1 contains "Mike", how can i replace the word "world" in A2 with the one in A1. 可以说我有一个单元格A2包含文本“ Hello world”,而单元格A1包含“ Mike”,我如何用A1中的那个替换A2中的“ world”一词。 I tried the REPLACE function but not getting the result i need. 我尝试了REPLACE函数,但没有得到我需要的结果。 Any ideas? 有任何想法吗?

You want SUBSTITUTE: 您要替换:

=SUBSTITUTE(A2,"World",A1)

在此处输入图片说明

You could try this if you always want to switch the part of the word after a space. 如果您总是想在空格后切换单词的一部分,可以尝试一下。

Concatenate(Left(A2;Find(" ";A2));A1)

If you want to do the same thing with the same source cell, then do this: 如果要对相同的源单元格执行相同的操作,请执行以下操作:

Concatenate(Left($A$2;Find(" ";$A$2));A1)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM