Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get one row out of every two rows?
suppose file1 has 200 rows, i want to get the first row, third row,
fifth row, ..., and put these 100 rows to a new file (file2). do i have to use vba, or i can directly do it in excel thanks a lot! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get one row out of every two rows?
Hi
You could use a helper column and (in row1) place the following formula: =MOD(ROWS($A$1:$A1),2) and copy down. Now you can use Autofilter (filter on the 1s) and then copy and paste the visible rows. Hope this helps! Richard MCI wrote: suppose file1 has 200 rows, i want to get the first row, third row, fifth row, ..., and put these 100 rows to a new file (file2). do i have to use vba, or i can directly do it in excel thanks a lot! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get one row out of every two rows?
VBA not needed.
In a helper column, say column Z, in Z1 enter 1 in Z2 enter =IF(Z1=0,Z1+1,0) and copy down you will see a column of alternating 1's and 0's Then use autofilter to hide all the 0's (even rows) and copy/paste. -- Gary's Student "MCI" wrote: suppose file1 has 200 rows, i want to get the first row, third row, fifth row, ..., and put these 100 rows to a new file (file2). do i have to use vba, or i can directly do it in excel thanks a lot! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get one row out of every two rows?
Helper column, formula =MOD(ROW(),2)
Autofilter by that column, choosing value 1. Copy the displayed column to your new file. -- David Biddulph "MCI" wrote in message oups.com... suppose file1 has 200 rows, i want to get the first row, third row, fifth row, ..., and put these 100 rows to a new file (file2). do i have to use vba, or i can directly do it in excel thanks a lot! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get one row out of every two rows?
thanks a lot, appreciate it!
RichardSchollar wrote: Hi You could use a helper column and (in row1) place the following formula: =MOD(ROWS($A$1:$A1),2) and copy down. Now you can use Autofilter (filter on the 1s) and then copy and paste the visible rows. Hope this helps! Richard MCI wrote: suppose file1 has 200 rows, i want to get the first row, third row, fifth row, ..., and put these 100 rows to a new file (file2). do i have to use vba, or i can directly do it in excel thanks a lot! |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get one row out of every two rows?
If this is an on going project, you can try this formula to copy over every
other row from Sheet1 to another sheet. As you add more data to Sheet1, simply extend (copy) the formula down additional rows to compensate for the new data. =INDEX(Sheet1!A:A,2*ROWS($1:1)-1) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "MCI" wrote in message oups.com... thanks a lot, appreciate it! RichardSchollar wrote: Hi You could use a helper column and (in row1) place the following formula: =MOD(ROWS($A$1:$A1),2) and copy down. Now you can use Autofilter (filter on the 1s) and then copy and paste the visible rows. Hope this helps! Richard MCI wrote: suppose file1 has 200 rows, i want to get the first row, third row, fifth row, ..., and put these 100 rows to a new file (file2). do i have to use vba, or i can directly do it in excel thanks a lot! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rows & Columns in Excel | Excel Worksheet Functions | |||
Automatically inserting rows | Excel Worksheet Functions | |||
Hiding Rows if the linked rows are blank | Excel Discussion (Misc queries) | |||
flexible paste rows function that inserts the right number of rows | Excel Discussion (Misc queries) | |||
Copying Rows when hiding other rows | Excel Worksheet Functions |