View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Steve Wylie Steve Wylie is offline
external usenet poster
 
Posts: 15
Default Select certain rows of sheet & delete the rest

I've got a big (58,000 rows) spreadsheet that I used as
the data source for a big Word mail merge a while back.
It contains the address of every household in the
district. I now wish to use the same spreadsheet but for
a sample survey, and only need every 10th address. So
basically I need to keep every 10th row and delete the
other nine, and be left with a spreadsheet containing
only 10 per cent of the original addresses.

What is the best way to do this? Is there a simple macro
that would do it? I tried recording myself deleting rows
but the macro works on absolute values so it only
recorded me deleting Rows 2-10 and that's all it does
every time I play it, so that's no good.

Or, failing that, is there a function/formula I could
employ to get the same effect?

It did occur to me to structure the Word merge so that
only the 10th record in the sheet was merged, but I
really need the sheet just to have the addresses that
were used in the merge this time round, not all the other
addresses as well.

Thanks for any help anyone can give on this.

Steve Wylie