Hi
I want combining two codes
first
second
so the open file should search for the empty or zero value for columns E,F together if so then should delete it and save file as xlsx with same formatting and borders.
any help will be appreciated .
I want combining two codes
first
VBA Code:
Sub test()
Dim OUTrng As Range
Set wsOUT = Sheets("OUT")
activesheet.Range("A1").CurrentRegion.Copy wsOUT.Range("A1")
Set OUTrng = activesheet.Range("A1").CurrentRegion
With OUTrng
.AutoFilter 5, ""
.AutoFilter 6, ""
Application.DisplayAlerts= False
.Offset(1).SpecialCells(xlCellTypeVisible).Delete
Application.DisplayAlerts= True
.AutoFilter
End With
End Sub
Code:
Sub copysheet()
Dim ws As Worksheet, StrPath As String
Application.DisplayAlerts = False
StrPath = ActiveWorkbook.Path & "\"
Set ws = MONTHLY
ws.Copy
wb_name = ws.Name
ActiveWorkbook.SaveAs Filename:= _
StrPath & " RTP " & Format(Date, "MM-DD-yyyy") & ".xlsx", FileFormat:=51
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
any help will be appreciated .