Greetings from Latvia, and i hope, ill find a good solution or any useful help in this forum.
At the moment im making a small project in VBA Excel for creating bills and invoices, so this is where my storry begins.
Thefore, Sheet1 in my excel workbook is a sheet, where the serial numbers and names of invoices and bills are stored.
Numbers are taken from Sheet2 from a specific cell, where a user must enter a name for invoice or bill. There are no specific terms by entering name (no criterias), it can be as simple as INV-01 or BILL- 22 or something like that
So i created a macro, that works like this-
when the button is pressed, macro takes 3 or more values from Sheet2 cells and stores value of these cells in Sheet1 in specified cells
No problems so far.
What i want to do -
I want to check entire Sheet1 column A for duplicates so the user cannot enter the same number of invoice twice in Sheet2 (actually it will be possible but it wont go further to store these values in Sheet1)
could probably look like:
Sub Duplicate check ()
.... ..... ....
If ..... then Duplicates found Else Continue
End Sub
'i will create a modules named "duplicates found" wich will pop out a Msgbox "Duplicates found" and reset a cell value of invoice number in Sheet2 and no values will be stored in Sheet1 and a second module Continue (to proceed if there are no duplicates) (no problems to make this)
The problem is, i have no idea, what is the code for checking duplicate values (it may sound dumb, cause i've done much more complicated things in this project already)
Any ideas?
P.s. sorry for my English
Bookmarks