Copying and Pasting Rows Macro

T

tnederlof

Right now I have a column on one work sheet with 1's and 0's, ones
meaning I need that row copied to a certain worksheet and zero's
meaning do not copy.

I need a macro that can copy the entire row if that rows column
'I" (where the 0's and 1's are) and paste it into a certain worksheet.
I know it sounds confusing please try to help me I am very new to
macros. Thanks
 
R

Ron de Bruin

Hi tnederlof

You can use AutoFilter to filter on the column

Activate AutoFilter:
Select a cell in your data table and use Data>Filter>AutoFilter to activate AutoFilter.
Tip: Shortcut for the English version is Alt d f f

In each header cell a dropdown will appear next to your field name.
Click on the dropdown in the with 1's and 0's field and choose 1.

Copy the filter result
1) Be sure that the active cell is in the data range
2) Press Ctrl * to select all data or use F5>Special>Current region>OK
3) Ctrl c or Edit>Copy
4) Insert>Worksheet
5) Ctrl v or Edit>Paste
6) Select the sheet with the filter ( the sheet with the with 1's and 0's column )
7) Press Esc
8) Press Alt d f f or Data>Filter>AutoFilter to turn off AutoFilter

If you want code see
http://www.rondebruin.nl/copy5.htm
 
Top