Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
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

  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Select certain rows of sheet & delete the rest

Use a help column, in that help column use this formula adjacent to the
first cell with an address

=MOD(ROW(1:1),10)<0

copy down 58000 rows, then apply the autofilter and from dropdown select
TRUE, then select all visible cells and do editdelete, entire row

--

Regards,

Peo Sjoblom


"Steve Wylie" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Select certain rows of sheet & delete the rest

I haven't seen my earlier post to this so I am sending another.

You could modify Peo's formula to:

=IF(MOD(ROW(10:10),10)<0,"","X")

Leave your Excel file as is. In the Word mail merge under section 3 you can set a Query_Option to only select data with an X in this field.

Query Options are very useful for merging a selected portion of your total list.

Good Luck,
Mark Graesser


----- Peo Sjoblom wrote: -----

Use a help column, in that help column use this formula adjacent to the
first cell with an address

=MOD(ROW(1:1),10)<0

copy down 58000 rows, then apply the autofilter and from dropdown select
TRUE, then select all visible cells and do editdelete, entire row

--

Regards,

Peo Sjoblom


"Steve Wylie" wrote in message
...
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


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
Select a range of rows to delete Donna[_3_] Excel Worksheet Functions 2 January 26th 10 07:32 PM
Help with rest of forumla - Delete rows based on criteria Mariann Excel Discussion (Misc queries) 4 June 10th 09 09:21 PM
how to select the first character in a cell and delete the rest Helenf Excel Worksheet Functions 4 May 14th 09 12:10 PM
select and delete specific rows Paulg Excel Discussion (Misc queries) 1 August 22nd 06 04:12 PM
select and delete all blank rows Bill from UniqueAuction.com Excel Discussion (Misc queries) 1 October 11th 05 09:06 PM


All times are GMT +1. The time now is 12:16 PM.

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"