View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default copy rows to another workbook

How about this:

Record a macro when you copy the worksheet (Edit|move or copy sheet)
to a new workbook.

Then apply data|filter|autofilter to that new worksheet in the new workbook.

Filter column A to show the rows "not equal to" S in column A.

Delete those visible rows.

Reset the filter.

Clean up column A.

Save the new workbook as a new name.

I bet your code would be very close to what you need.

If you have trouble tweaking the code, post back with your questions.



sortilege wrote:

Hi,
I'm stuck with this problem: I would speed my daily work if I could
automatically copy some rows of my current worksheet (a table with 20
columns and 100 rows) in another workbook.

I thought to create a VBA macro that
1 - triggers when a button is pressed
2 - ask user for the name and location of the new workbook (a dialog box)?
3 - create such workbook
4 - copy there the rows with a "S" on the first cell of every row (column A)
5 - automatically reset the column A to blank cells.

Any hints or link to some VBA code to look at?

Thanks

Monica


--

Dave Peterson