|
- Sub test6()
- Dim col$, i%, last&
- Application.ScreenUpdating = False
- last = Sheet3.Range("A" & Rows.Count).End(xlUp).Row
- Sheet2.Cells.Delete
- Sheet3.Rows("1:" & last).Copy Sheet2.Range("A1")
- col = "KMNOPQRTVW"
- For i = 87 To 75 Step -1
- If InStr(col, Chr(i)) > 0 Then
- With Sheet2.Columns(Chr(i) & ":" & Chr(i))
- .Copy
- .Offset(, 1).Insert Shift:=xlToRight
- End With
- Sheet2.Cells(1, Chr(i + 1)).Value = Sheet2.Cells(1, Chr(i + 1)).Value & "A"
- End If
- Next
- Sheet2.Columns("A:AH").Columns.AutoFit
- Application.CutCopyMode = False
- End Sub
复制代码 |
|