跳到主要内容

如何在Excel中将单词或数字拆分为单独的单元格?

如果您在工作表中有数字或单词的列表,现在需要按照下面的屏幕快照将单元格内容拆分为不同单元格上的字母,那么如何在Excel中处理此工作?


箭头蓝色右气泡 使用公式将单词或数字拆分为单独的单元格

使用以下简单公式,您可以快速方便地分离不同单元格上的单元格内容。

1。 在数据旁边的空白单元格(例如C1)中,请输入此公式 = MID($ A1,COLUMNS($ A $ 1:A $ 1),1),请参见屏幕截图:

doc将单词拆分为字母2

2。 然后将填充手柄拖到右侧的单元格,直到显示空白单元格,并且单元格A1中的内容已拆分为单独的单元格。

doc将单词拆分为字母3

3。 然后继续将填充手柄向下拖动到要应用此公式的范围,然后,您可以根据需要在不同的单元格上分隔A列中的所有数据。 看截图:

doc将单词拆分为字母4


箭头蓝色右气泡 使用VBA代码将单词或数字拆分为单独的单元格

如果您对VBA代码感兴趣,下面的代码也可以帮您一个忙。

1。 按住 ALT + F11 在Excel中打开键 Microsoft Visual Basic for Applications窗口.

2。 点击 插页 > 模块,然后将以下代码粘贴到 模块窗口.

VBA代码:将单词拆分为单独的单元格

Sub SplitStuff()
'Updateby Extendoffice
Dim Rng As Range
Dim InputRng As Range, OutRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
Application.ScreenUpdating = False
For Each Rng In InputRng
    xValue = Rng.Value
    xRow = Rng.Row
    For i = 1 To VBA.Len(xValue)
        OutRng.Cells(xRow, i).Value = VBA.Mid(xValue, i, 1)
    Next
Next
Application.ScreenUpdating = True
End Sub

3。 然后按 F5 键来运行此代码,然后会出现一个提示框,提示您选择要使用的数据范围,请参见屏幕截图:

doc将单词拆分为字母5

4. 点击 OK,然后会弹出另一个提示框,告诉您选择一个单元格以查找结果。

doc将单词拆分为字母6

5。 然后点击 OK,并且所选单元格中的单词或数字已拆分为单个字符。 看截图:

doc将单词拆分为字母7


箭头蓝色右气泡 使用 Kutools for Excel 将单词或数字拆分为单独的单元格

Kutools for Excel分裂细胞 功能是一个功能强大的工具,可以帮助您将单元格内容拆分为具有特定定界符的单独的列或行,同时还可以将文本和数字分为两列。

Kutools for Excel : 带有300多个便捷的Excel加载项,可以在30天内免费试用.

安装后 Excel 的 kutools,请执行以下操作:

1。 选择要拆分的单元格。

2。 然后点击 库工具 > 合并与拆分 > 分裂细胞,请参见屏幕截图:

3。 在 分裂细胞 对话框,请选择 拆分为列 在下面 Type,然后检查 指定宽度 在下面 分割为 部分,然后输入数字 1 进入文本框,这意味着将单词按每个字符分成几个单独的单元格。 看截图:

doc将单词拆分为字母9

4。 然后点击 Ok 按钮,弹出另一个提示框,提醒您选择一个单元格以输出结果,请参见屏幕截图:

doc将单词拆分为字母10

5。 然后点击 OK,所选内容中的单元格内容已拆分为单个字符。 看截图:

doc将单词拆分为字母11

 立即下载并免费试用 Kutools for Excel!


箭头蓝色右气泡 使用 Kutools for Excel 将单词或数字拆分为单独的单元格

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!

箭头蓝色右气泡 将分开的字母或数字组合成一个单词或数字

将分开的字母或数字组合成一个单词或数字

与上述方法相比,如果您想将这些分隔的单元格字母组合成一个单词, Kutools for Excel's 结合 实用程序可以帮助您将它们尽快组合到一个单元格中。

doc将单词拆分为字母12

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!


相关文章:

如何从Excel中的文本字符串中提取第一个/最后一个/第n个单词?

如何从单元格中提取每个单词的首字母?

最佳办公生产力工具

🤖 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 (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
i have an address label list with the entire label in one row. i want to divide the name from the address and city, state and zip into three rows. Is there a way to divide an address label by separating the first three words into the first line, and the second three into the second line, and the last three into the last one?
This comment was minimized by the moderator on the site
Hello friend,

How are you. You can read this article: https://www.extendoffice.com/documents/excel/3347-excel-break-address-into-parts.html. In this article, you can use the Split Cells utility of Kutools for Excel. You can choose to spilt the cell to Rows or columns. Please have a try.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
I have compounds, how to split based on element symbol:
Ca(ClO4)2, --> Ca, (, Cl, O, 4, ), 2
MgSO4 --> Mg, S, O, 4
Help me.
This comment was minimized by the moderator on the site
Hello, Urip,
I'm Sorry, may be there is no direct way for solving your problem.
Anyone has a good solution, please comment here.
Thank you!
This comment was minimized by the moderator on the site
Paste your character string in any cell, say, B2.
Enter in, for example, cell D2:
=mid($B2,D$1,1)
In row 1, starting in column D, number cells incrementally and horizontally from 1 -> N where N is the number of characters in your string; D2 contains 1, E2 contains 2, etc.
Pull formula from D2 to N2.
This comment was minimized by the moderator on the site
Thank you for this! It worked and saved me so much time to do it manually!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations