View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default 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!