Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select a range of rows to delete | Excel Worksheet Functions | |||
Help with rest of forumla - Delete rows based on criteria | Excel Discussion (Misc queries) | |||
how to select the first character in a cell and delete the rest | Excel Worksheet Functions | |||
select and delete specific rows | Excel Discussion (Misc queries) | |||
select and delete all blank rows | Excel Discussion (Misc queries) |