Hello,
I'm trying to record data by using a userform which will then write/paste values of boxes in the userform to a Sales worksheet. Instead of writing/pasting directly values on the userform, I would like first once the userform 'Record' button is clicked to check whether 2 values (Supplier and Reporting Month) of the userform are not already recorded on the worksheet. If these 2 values exist already simultaneously, then a "Duplicate" message box pops. Then Exit the Sub and clear all the contents of the userform. Otherwise, it will write the userform values to a new line (row) on the Sales worksheet.
There were many ways of achieving the intended result nut I wonder if there is something simple and easy. I was thinking about using a evaluate command to use with Match function to render the formula on the worksheet Cell B15:
Formula:
{=IF(MATCH(1,($B$9=$G:$G)*($B$10=$O:$O),0)>0, "Duplicate")}
Below is the workbook I wrote with some help to achieve it. The issue though is that it doesn't do what it is intended to do.
Your help is very much appreciated. Thank you.
Bookmarks