关闭

Public Function MyReplace(rng As Range

103人阅读 评论(0) 收藏 举报
分类:


Public Function MyReplace(rng As Range, strFrom As String, strTo As String) As String
'Merge = ThisWorkbook.Name
Dim Str As String
Str = ""
Dim n As Range
For Each n In rng
   If n.Value <> "" Then
      Str = Replace(n.Value, strFrom, strTo)
   End If
Next n

'If Right(Str, 1) = splitter Then
'  Str = Left(Str, Len(Str) - 1)
'End If

MyReplace = Str

End Function


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:2981195次
    • 积分:40173
    • 等级:
    • 排名:第93名
    • 原创:399篇
    • 转载:4555篇
    • 译文:5篇
    • 评论:609条
    文章分类
    最新评论