|
Sub test()
Dim A, p, f, i
Application.ScreenUpdating = False
Application.DisplayAlerts = False
A = Sheets(1).Range("a1").CurrentRegion
p = ThisWorkbook.Path & "\"
For i = 2 To UBound(A)
f = Format(A(i, 1), "000") & "-" & A(i, 2)
With Sheets(2)
.[a1].CurrentRegion.Replace "XX", A(i, 2)
.Copy
End With
With ActiveWorkbook
.SaveAs p & f
.Close
End With
Next i
End Sub
学生库2.rar
(8.95 KB, 下载次数: 5)
|
|