I have a shared workbook, where it is possible for people to write article numbers in a column, i've made a datavalidation so that you can't write a number that is already there. However if you paste, it doesnt work. So i found a VBA online, which when pasting would check if data validation had been overwritten. It worked perfectly until today. Not sure if there has been an update to Excel, but it doesn't look like datavalidation is overwritten anymore, therefor the VBA code doesnt work.
So i 've been googeling without much luck for a VBA that checks whether a pasted value already exists, and if it does it would undo the paste, and tell the one pasting, that the values pasted, there is a value(s) that is already in the range.
The column that you can paste and type values into is named ValidationRange, and it is a column. Can someone maybe help with a quick code?
Often the people pasting, will paste several values at once into several cells in the column, so it need to check for each pasted cell value, if it already exists in range.
Bookmarks