0

我想在 excel 中每 11 位数字后加上逗号,我的数据将是这样的。

ODU88131042ODU88131043ODU88131044ODU88131045ODU65110840ODU65110829ODU65110833ODU65110834ODU88131046ODU88131047ODU88131048ODU88131049ODU88131

我想要这样的答案

ODU88131046,ODU88131047,ODU88131048,ODU88131049,ODU88131050,ODU88131051,ODU88131052,ODU88131053,ODU88131054,ODU88131055,ODU88131056,ODU88131057,ODU88131058,ODU88131059,ODU88131060,ODU88131061,ODU88131062,ODU88131063,ODU88131064,ODU88131065,ODU88131066,ODU88131067,ODU88131068,ODU88131069,ODU88131070,ODU88131071,ODU88131072,ODU88131073,ODU88131074,ODU88131075,ODU88131076,ODU88131077,ODU88131078,ODU88131079,ODU88131080,ODU88131081,ODU88131082,ODU88131083,ODU88131084,ODU88131085,ODU88131086,ODU88131087,ODU88131088,ODU88131089,ODU88131090,

这是一个修复,我希望逗号在 11 位数字中,并且它只在一个单元格中显示,结果也只显示在一个单元格中。请帮帮我..

4

2 回答 2

5

这是使用VBA的方法。选择要放置逗号的单元格并运行宏。

Sub AddCommas()
    Dim s As String
    s = Selection.Value
    Dim x As Long
    x = Len(s) \ 11
    If Len(s) Mod 11 = 0 Then
        x = x - 1
    End If
    Do Until x <= 0
        s = Left(s, x * 11) & "," & Mid(s, x * 11 + 1)
        x = x - 1
    Loop
    Selection.Value = s
End Sub
于 2012-11-01T07:51:11.590 回答
0
=SUBSTITUTE(TRIM(SUBSTITUTE(" "&SUBSTITUTE(TEXT(A1,REPT("00000000000 ",EVEN(LEN(C4)))),"00000000000 ",)," 00000000000 ",))," ",",")
于 2016-12-15T12:25:26.767 回答