S
scottymelloty
I did manage to do this myself by recording the macro to save eac
workbook and adding it after the original code i had
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "D").Value = " v " Then
Rows(RowNdx).Delete
End If
Next RowNdx
Sheets("Sheet2").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\scott\My Documents\evt_test.csv"
FileFormat:= _
xlCSV, CreateBackup:=False
Sheets("Sheet3").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\scott\My Documents\mkt_test.csv"
FileFormat:= _
xlCSV, CreateBackup:=False
Sheets("Sheet4").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\scott\My Documents\SEL_TEST.csv"
FileFormat:= _
xlCSV, CreateBackup:=False
End Sub
So this deletes rows with " v " in column d then save the other
worksheets just as i wanted butit only deletes the cells with "v " i
the sheet i am open and i want it to go through sheets 2, 3 & 4 an
delete the rows with " v " in as well, what can i add for it to d
that, im guessing its something to do with this line ??
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
Where it says active sheet how do i get it to check sheet 2,3 and 4 ??
Thank
workbook and adding it after the original code i had
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "D").Value = " v " Then
Rows(RowNdx).Delete
End If
Next RowNdx
Sheets("Sheet2").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\scott\My Documents\evt_test.csv"
FileFormat:= _
xlCSV, CreateBackup:=False
Sheets("Sheet3").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\scott\My Documents\mkt_test.csv"
FileFormat:= _
xlCSV, CreateBackup:=False
Sheets("Sheet4").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\scott\My Documents\SEL_TEST.csv"
FileFormat:= _
xlCSV, CreateBackup:=False
End Sub
So this deletes rows with " v " in column d then save the other
worksheets just as i wanted butit only deletes the cells with "v " i
the sheet i am open and i want it to go through sheets 2, 3 & 4 an
delete the rows with " v " in as well, what can i add for it to d
that, im guessing its something to do with this line ??
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
Where it says active sheet how do i get it to check sheet 2,3 and 4 ??
Thank