Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 -- scottymellot ----------------------------------------------------------------------- scottymelloty's Profile: http://www.excelforum.com/member.php...nfo&userid=380 View this thread: http://www.excelforum.com/showthread.php?threadid=27148 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |