Hi.

I use an excel spreadsheet to track my stock, but i'm after a code to prevent me from having two records with the same barcode.

When adding new stock to the spreadsheet using a Worksheet called "New Stock", I type the barcode into cell D7 (along with other info about the stock in other cells on that workbook)

I then hit a macro which copies the information to a worksheet called "Stock List" (using vlookup to find the first empty row to paste it to)

I'm wondering if there is any way I can get excel to check whether the barcode I enter into D7/New Stock is already somewhere in column B/Stock List

Either by modifying the current macro which copies the info across, or by conditional formatting where say cell D8 turns red and tells me i'm an idiot.

Anyone have any ideas?

Thank you very much for the help.