乔山办公网我们一直在努力
您的位置:乔山办公网 > office365 > 怎么把一个excel表格里的数字和文字拆分开-office2007 分列,office2013

怎么把一个excel表格里的数字和文字拆分开-office2007 分列,office2013

作者:乔山办公网日期:

返回目录:office365


如果是Excel2016、Excel365或Excel2019,试试看快速填充(快捷键:ctrl+e)。也就是在第一行每一个单元格手动写入你提取出来的内容,然后按ctrl+e来快速填充。


用正则表达式自定义公式
Function 去除(rng As Range, Optional shuzi As Integer = 2)
Set regx = CreateObject("vbscript.regexp")
With regx
.Global = True
If shuzi = 0 Then
.Pattern = "\d" '参数2=0时去除数字
ElseIf shuzi = 1 Then
.Pattern = "[a-zA-Z]" '参数2=1去除字母
ElseIf shuzi = 2 Then
.Pattern = "[一-龢]" '参数2=2去除汉字
End If
去除 = .Replace(rng, "") '将匹配的字符替换成空(删除)
End With
End Function
(代码来源:51自学网-Excel2010 VBA教程-曾志贤老师)

相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网