Удаление символа новой строки

Function delcr2000(r As Range)
Dim arr() As String
ReDim arr(200)
For i = 1 To Len(r)
  arr(i) = Mid(r, i, 1)
  If Mid(r, i, 1) = " " Then arr(i) = " "
  If Mid(r, i, 1) = Chr(10) Then arr(i) = " "
Next i
delcr2000 = Join(arr(), "")
End Function


'Удалить данные после "("
Function delcr2000(ByVal r As Range)
Dim arr() As String
ReDim arr(200)
For i = 1 To Len(r)
  arr(i) = Mid(r, i, 1)
  If Mid(r, i, 1) = "(" Then
     arr(i) = " "
     Exit For
  End If
Next i
delcr2000 = Join(arr(), "")
End Function

Добавить комментарий

Ваш адрес email не будет опубликован.