- excel函数教程:使用Excel“导入外部数据”功能导入标准工时数据
- 这么多图表类型,你让我怎么选?
- excel教程:让OnKey方法和OnTime方法的设置自动生效
- excel教程:利用Excel VLOOKUP函数实现逆向查询数据
以下过程供参考:
Function MidS(ByVal txt, n As Byte) As String
Application.Volatile True
Dim T As String, i As Long
Dim NumStr As String, EnStr As String, Other As String
For i = 1 To Len(txt)
T = Mid(txt, i, 1)
If T Like "[0-9]" Then
NumStr = NumStr & T
ElseIf T Like "[A-z]" Then
EnStr = EnStr & T
Else
Other = Other & T
End If
Next i
If n = 0 Then
MidS = NumStr
ElseIf n = 1 Then
MidS = EnStr
ElseIf n = 2 Then
MidS = Other
Else
MidS = "#参数错误!"
End If
End Function
上一篇:excel宏教程:8个实用Excel小技巧,谁用谁说好 下一篇:excel表格制作:比较运算符的应用举例
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。