Hi.
Hoping for some help on a VBA to remove only the first occurence of a duplicate.
Just a bit on my current setup;
This is essentially a goods out system.
Stock levels are held in the sheet "Stock" (A-Description, B-Product Ref, C-Supplier Barcode, D-Stock QTY).
The Stock sheet reads from another sheet, "Feed". Which is essentially just a counter which adds another row in once a barcode is scanned. It will add the Supplier Barcode into column B. Column A then has a Vlookup to reference that barcode in another sheet, "Barcode Library" where it matches the barcode to the product ref and pulls this through (into "Feed", A).
Back to the sheet "Stock". In Stock QTY (D) I have a CountIf to count the matching barcodes to give a stock quantity (example: A4 = Set of bearings | REF XXXXX | <barcode> | 5).
G3 has a dropdown which lists all of the Descriptions (column A). Once selected, G4 has a Vlookup to match the Product Ref (I did this as "Feed" has the Product Refs in column A).
I have a command button just below G7. The idea is that you would select your item from the dropdown (G3), hit the command button and it would delete the first match (of the Product Ref) over in Feed. Therefore reducing the Stock QTY by 1.
Unfortauntley I'm getting nowhere with the command button. Can anyone help? Absolute dream would be to have an additional box in G (ideally G5) where I could also add the quantity I need to book out and it would remove this many matches from Feed. If not I can keep to one by one as we don't book that many out (typically only 1 but can be more).
Any help on this would be greatly appreciated.
TIA
Hoping for some help on a VBA to remove only the first occurence of a duplicate.
Just a bit on my current setup;
This is essentially a goods out system.
Stock levels are held in the sheet "Stock" (A-Description, B-Product Ref, C-Supplier Barcode, D-Stock QTY).
The Stock sheet reads from another sheet, "Feed". Which is essentially just a counter which adds another row in once a barcode is scanned. It will add the Supplier Barcode into column B. Column A then has a Vlookup to reference that barcode in another sheet, "Barcode Library" where it matches the barcode to the product ref and pulls this through (into "Feed", A).
Back to the sheet "Stock". In Stock QTY (D) I have a CountIf to count the matching barcodes to give a stock quantity (example: A4 = Set of bearings | REF XXXXX | <barcode> | 5).
G3 has a dropdown which lists all of the Descriptions (column A). Once selected, G4 has a Vlookup to match the Product Ref (I did this as "Feed" has the Product Refs in column A).
I have a command button just below G7. The idea is that you would select your item from the dropdown (G3), hit the command button and it would delete the first match (of the Product Ref) over in Feed. Therefore reducing the Stock QTY by 1.
Unfortauntley I'm getting nowhere with the command button. Can anyone help? Absolute dream would be to have an additional box in G (ideally G5) where I could also add the quantity I need to book out and it would remove this many matches from Feed. If not I can keep to one by one as we don't book that many out (typically only 1 but can be more).
Any help on this would be greatly appreciated.
TIA