PDA

View Full Version : checking for duplicates when creating macro to move data into master sheet



aleisaab
08-10-2021, 12:58 PM
Hello Everyone. I am a new student to VBA and am amazed by the unlimited capabilities of it. I honestly need ur help in my first macro. I created a macro that extracts monthly sales from a text file, formats it, and then sends it to the master sheet with sales for previous months. the Function adds new data at the bottom of the master sheet. I created a button that will trigger this entire action, but what if i accidentally click the button twice and the information is duplicated? your support is sincerely appreciated.

Paul_Hossler
08-10-2021, 01:56 PM
Well, the easy answer is to not click the button twice :)

Without seeing what the data looks like, it's hard to suggest a test

Attach a small workbook with the data and maybe the macro and we can take a loop for you