#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default batch delete

I have a file of about 10,000 lines that I down load each week. this file
contains SKU numbers I have a list of about 1,000 sku numbers in another file
that have to be deleted out of that big file each week before the big file
can be used. is there a way to run a batch delete using the list of 1,000 as
a guide of the sku numbers to be deleted from the 10,000 line file?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default batch delete

Here's a way using non-array formulas which can deliver the required extract ..
(do hang around awhile for possible vba options from others)

A sample construct is available at:
http://cjoint.com/?jve1fKzycl
Extracting an exclusion list.xls
(Link above is good for 14 days)

In a sheet: X,
the 1,000 reference sku's to be deleted are listed in A2 down (text label in
A1: sku)

In a sheet: Y,
the 10,000 lines downloaded source listing is in cols A to C, labels in
A1:C1, data from row2 down, where col A = sku (the key col)

Then in a new sheet: Z,
with the same col labels in Y pasted in B1:D1

Place in A2:
=IF(Y!A2="","",IF(ISNUMBER(MATCH(Y!A2,X!A:A,0)),"" ,ROW()))
(Leave A1 blank)

Place in B2:
=IF(ROW(A1)COUNT($A:$A),"",INDEX(Y!A:A,MATCH(SMAL L($A:$A,ROW(A1)),$A:$A,0)))
Copy B2 to D2

Then just select A2:D2, copy down to cover the max expected extent of data
in Y, say down to D10100?. Cols B to D will return the required results, ie
only the lines from Y with sku's not found in the list in X (the deletion
list), with all lines neatly bunched at the top.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"jason2444" wrote:
I have a file of about 10,000 lines that I down load each week. this file
contains SKU numbers I have a list of about 1,000 sku numbers in another file
that have to be deleted out of that big file each week before the big file
can be used. is there a way to run a batch delete using the list of 1,000 as
a guide of the sku numbers to be deleted from the 10,000 line file?

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
I can't delete a cell without deleting a row Tenny Excel Discussion (Misc queries) 2 June 30th 06 12:52 AM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
How to delete in batch the same color format letters in a cell yang xin Excel Worksheet Functions 1 February 5th 06 04:42 AM
how do I delete a worksheet from my workbook DLee New Users to Excel 2 August 15th 05 09:59 PM
Delete row depending on criteria adw223 Excel Discussion (Misc queries) 1 June 30th 05 12:55 AM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"