search and delete row with matching data

breakbadnm

New Member
Joined
Apr 3, 2011
Messages
9
I'm not sure how to phrase my question so I'll do the best I can. I have an inventory file in Excel that has four columns, the last column is called "SKU". I have a report I download from a site that has a list of SKUs and quantities that were sold, and I need to remove one of each row with the corresponding SKU from my inventory (Excel) file.

So as an example say the report I download has the following data:

SKU: Qty:
A123 1
A456 3
A789 1

I would want to be able to delete one row in my inventory Excel file that has "A123" in the SKU column, delete 3 rows in my inventory file that has "A456" in the SKU column, and finally delete 1 row in my inventory file that has "A789" in the SKU column. Five rows total should be removed. Anyone know how to do this?? Many thanks in advance!!
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Subtracts 65 (ASCII A) from the ASCII value of N (78) and P (80) to give a zero-based index into the parts array. parts(13) and parts(15) are the N and P 'columns' respectively in your tab-delimited file. Using letters like N and P rather than numbers makes the code more readable and easier to relate the data to the columns in your tab-delimited file.

Step through the code with F8 in the VB debugger, examining the different variables if you want to understand it better.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,288
Members
448,563
Latest member
MushtaqAli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top