Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
sortilege
 
Posts: n/a
Default copy rows to another workbook

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
  #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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy workbook sheets? L. Setting up and Configuration of Excel 3 November 29th 05 03:30 AM
copy worksheet to a new workbook with formulas .... but new file not point to old one newToExcel Excel Discussion (Misc queries) 7 November 13th 05 09:55 PM
Can not copy a worksheet to another workbook cyndi Excel Discussion (Misc queries) 2 November 10th 05 06:50 PM
excel dup copy of workbook Bonnie Excel Worksheet Functions 4 July 3rd 05 09:06 PM
copy COLUMN from 1 worksheet to another (in a different workbook) DavidB Excel Discussion (Misc queries) 3 January 15th 05 02:47 PM


All times are GMT +1. The time now is 05:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"