S
scottymelloty
I Have 4 worksheets in a file that i use
Worksheet 1 is where i type all my data
Worksheet 2,3,4 autogenerate data from Worksheet 1
When there are lines in Column D with " v " in them i want the
deleted, i found this code that does it perfectly
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
End Sub
But it only does it when im in a worksheet , so i have to go into eac
one then run the macro, is it possible that when ive typed my data i
worksheet 1 i can run a similar macro that deletes all the rows with
v " in worksheet 2,3 & 4 all at the same time. Im guessing this i
quite easy but i dont know my way around VB at all. Many Thanks
As an additional thing when worksheets 2,3,4 have there rows deleted
save worksheet 2 as evt_test , worksheet 3 as mkt_test and worksheet
as sel_test all in CSV format, i do all this manually.
Is there a macro that i could run that dleetes my lines as above the
automatically saves these worksheets as described.
Any help is much appreciated, Thanks
Worksheet 1 is where i type all my data
Worksheet 2,3,4 autogenerate data from Worksheet 1
When there are lines in Column D with " v " in them i want the
deleted, i found this code that does it perfectly
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
End Sub
But it only does it when im in a worksheet , so i have to go into eac
one then run the macro, is it possible that when ive typed my data i
worksheet 1 i can run a similar macro that deletes all the rows with
v " in worksheet 2,3 & 4 all at the same time. Im guessing this i
quite easy but i dont know my way around VB at all. Many Thanks
As an additional thing when worksheets 2,3,4 have there rows deleted
save worksheet 2 as evt_test , worksheet 3 as mkt_test and worksheet
as sel_test all in CSV format, i do all this manually.
Is there a macro that i could run that dleetes my lines as above the
automatically saves these worksheets as described.
Any help is much appreciated, Thanks