|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Sub TEST2()
Dim ar, br, i&, j&, strJoin$
Application.ScreenUpdating = False
With [A1].CurrentRegion
ar = .Value
ReDim br(1 To UBound(ar), 0)
For i = 1 To UBound(ar)
strJoin = ""
For j = 3 To UBound(ar, 2)
If .Cells(i, j).Interior.ColorIndex <> -4142 Then
strJoin = strJoin & "." & ar(i, j)
End If
Next j
br(i, 0) = ar(i, 1) & ar(i, 2) & ";" & Mid(strJoin, 2)
Next i
End With
[U1].Resize(UBound(br)) = br
Application.ScreenUpdating = True
Beep
End Sub
|
|