Dear All,
I should be grateful if you would, please, help me with a vba code to check the correctness of the number in a given cell and also check if there is a duplicate of that number in a particular column. Here is the scenario:
1. The worksheet I am working on is named 'Products'
2. A number is keyed into e.g. Cell H5. The number format is 2 alphabets followed by 3 numbers e.g. 'DV001'.
3. The code should check that whatever number that is entered into that cell must have 2 alphabets followed by 3 numbers: If not, there should be a msg saying that the number is invalid - to be re-entered.
4. If the number meets that first test, then the code should check the number against all the numbers in say 'Column J' to ensure that the same number doesn't already exist in that column. If it exists, there should be a msg saying it is a 'duplicate number' - so that a different number could be entered into the cell..
I am very new with vba and don't know how to put this together.
I will be very glad for any help, please.
Buddy
Bookmarks