跳到主要内容

如何仅在Excel中提取空格或逗号前后的文本?

当您要从列表中提取空格之前或之后的文本时,如下所示,您是否有一种很好的方法来完成它? 让我告诉您一些技巧,仅在Excel中提取空格之前或之后的文本。


在Excel中使用公式提取空格之前或之后的文本

您可以仅使用公式从列表中快速提取空格之前的文本。

选择一个空白单元格,然后键入此公式 = LEFT(A1,(FIND(“”,A1,1)-1)) (A1是要提取文本的列表的第一个单元格),然后按 输入 按钮。

Tips:
(1)如果要在逗号之前或之后提取文本,则可以更改 “”“,”.
(2)如果只想在空格后提取文本,请使用此公式 = MID(A1,FIND(“”,A1)+1,256).
(3)此方法按指定单元格中的第一个空格提取文本。 如果单元格中存在多个空格,例如“ Katty J James”,则公式为 = MID(A1,FIND(“”,A1)+1,256) 将提取第一个空格之后的所有字符。

注意丝带 公式太难记了吗? 将公式另存为自动文本条目,以供日后再次使用!
阅读全文...     免费试用

仅将一个单元格/列中的数字(或文本)提取到不同的列/行中

Kutools for Excel 增强了其 分裂细胞 实用程序并支持将所有文本字符或数字从一个单元格/列中批量提取为两列/行。


Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!


使用 Kutools for Excel 提取空格之前或之后的文本

如果你已经安装 Kutools for Excel,您可以使用它 提取文字 实用程序可快速仅从列表中提取空格之前或之后的文本。

Kutools for Excel - 包含 300 多个 Excel 基本工具。 享受全功能 30 天免费试用,无需信用卡! 现在下载!

1。 选择列表,然后单击 库工具 > 文本 > 提取文字。 看截图:

2。 在弹出对话框中,键入 * 空间文本 框中单击 地址 按钮,仅在 提取清单 部分,然后单击 Ok 按钮。
Tips::如果只想在空格后提取文本,请键入 空间 并按照 *文本 此步骤中的框。

3。 在另一个弹出对话框中,请指定目标范围的第一个单元格地址,您将输出提取的数据,然后单击 OK 按钮。 到现在为止,您只能在仅提取空格之前看到文本。
     
备注:如果要在逗号之前或之后提取文本,可以键入 *, or ,*文本 框。


分别在空格之前和空格/逗号之后分别提取文本

Kutools for Excel 支持另一个实用程序 分裂细胞 实用程序可帮助我们提取空格/逗号之前的文本和空格/逗号之后的文本,并将它们输出到不同的单元格中。 请执行以下操作:

Kutools for Excel - 包含 300 多个 Excel 基本工具。 享受全功能 30 天免费试用,无需信用卡! 现在下载!

1。 选择要提取的文本字符串列表,然后单击 库工具 > 文本 > 分裂细胞.

2。 在打开的“拆分单元格”对话框中,在 Type 部分中,检查 分割为 部分,然后单击 Ok 按钮。 参见上面的截图:
在我们的情况下,我们检查 拆分为列 选项和 太空 选项,然后单击 Ok 按钮。 现在,文本字符串列表将根据空间分为列或行。 参见下面的截图:

备注:如果您需要在逗号前后提取文字,请检查 其他名称 选项在第一个“拆分单元格”对话框中,然后在下面的框中键入逗号“,”。


演示:通过 Kutools for Excel 提取空格、逗号或其他分隔符之前或之后的文本


Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

相关文章:

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (32)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thanks a lot
This comment was minimized by the moderator on the site
hello olivia john
hello olivia john david
hello olivia john robert more

Excel contains the data we need, but I'd like a value of end to appear before words like as.

john
david
more
Please provide any formula's clarification.
This comment was minimized by the moderator on the site
Hi, Nandakumar, I do not understand you problem. Do you want to extract the end word from each string or like to add the end value of the front cell before words in next cell?
This comment was minimized by the moderator on the site
hello olivia john
hello olivia john david
hello olivia john robert more

Excel contains the data we need, but I'd like a value of end to appear before words like as.

hello olivia john john
hello olivia john david david
hello olivia john robert more more

Please provide any formula's clarification.
This comment was minimized by the moderator on the site
Tried your example, I needed to read from cell D2 and read something before a space

=LEFT(D2,(FIND(" ","D2",1)-1))

and got: #VALUE!
This comment was minimized by the moderator on the site
Try with ";" instead of ","
This comment was minimized by the moderator on the site
What is the first "data" location for the sentence in row 6? ..Please answer me 🙏
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
Muchas gracias
This comment was minimized by the moderator on the site
Hello, thanks for this article, but is there a way for a mid function to work on the second space?
This comment was minimized by the moderator on the site
Hi Aland,
For example there is a sentence in the cell B3, you can extract the text after the second space from this cell with formula =MID(B3,FIND(" ",B3,FIND(" ",B3)+1),256)
This comment was minimized by the moderator on the site
Mehar Kusum Manav Maa Singh Bisht

what is formula for separate above words...
This comment was minimized by the moderator on the site
Hi Mehar singh bisht,
Do you mean split “Mehar Kusum Manav Maa Singh Bisht”, and place every word in a separate cell? You can select the cell containing the content, and click Data > Split to Column (set the delimiter as space) to split it.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations