'A列源数据,A1开始,输出B列
Option Explicit
Sub test()
Dim i, j, arr, t, tt, brr, a, b
arr = Range("a1:a" & [a65536].End(xlUp).Row)
ReDim brr(1 To UBound(arr, 1), 1 To 1)
For i = 1 To UBound(arr, 1)
t = arr(i, 1)
For j = 1 To Len(arr(i, 1)) - 1
brr(i, 1) = brr(i, 1) & Mid(t, j, 1)
a = IIf(Asc(Mid(t, j, 1)) > 0, 1, -1)
b = IIf(Asc(Mid(t, j + 1, 1)) > 0, 1, -1)
If a * b < 0 Then brr(i, 1) = brr(i, 1) & Space(1)
Next
brr(i, 1) = brr(i, 1) & Right(t, 1)
Next
With [b:b]
.ClearContents
.Resize(UBound(arr, 1), 1) = brr
End With
End Sub