|
楼主 |
发表于 2024-1-11 10:00
|
显示全部楼层
Sub ykcbf() '//2023.4.12
Dim arr, brr
p = ThisWorkbook.Path & "\"
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim tm: tm = Timer
arr = Sheet15.UsedRange
ReDim brr(1 To UBound(arr), 1 To UBound(arr, 2))
For i = 2 To UBound(arr)
If InStr(arr(i, 4), "删除") = 0 And InStr(arr(i, 15), "删除") = 0 And InStr(arr(i, 24), "删除") = 0 Then
m = m + 1
For j = 1 To UBound(arr, 2)
brr(m, j) = arr(i, j)
Next
End If
Next
Set wb = Workbooks.Add
Set sht = wb.Sheets(1)
With sht
.Columns("a:BW").NumberFormatLocal = "@"
.[a1].Resize(UBound(brr), UBound(brr, 2)) = brr
End With
mFile = p & "文件另存.xlsx"
wb.SaveAs Filename:=mFile, FileFormat:=51
wb.Close True
Application.ScreenUpdating = True
MsgBox "另存完毕,共用时: " & Format(Timer - tm, "0.000秒"), , "提示"
End Sub
Sub 凭证生成()
End Sub
这是目前的宏代码,请问怎么增加,谢谢啊,各位大佬!!!!! |
|