So I recently made some tweaks to a macro that an employee had stashed on their computer prior to them leaving the office. I had it working a few times and now it errors out on me, and with a small background in java I understand just enough to be able to make things work. Now I'm stuck.
The macro is supposed to use my entire spreadsheet, find duplicates, and copy the first duplicate (edit: and its entire row) to the second sheet. I use =COUNTIF(A4:A1836,"="&A4) to generate my H column with how many occurences a UPC code is entered in the list proceeding the current number, which means if 14 happens twice, the first 14 will have a 2 in the H column and the second 14 will have a 1.
I've looked through the coding and as far as I can see, it must be some spacing or programming grammar that has caused it to error, any help would be greatly appreciated.
Here is the macro
Bookmarks