Hello does anyone know why some of the rows of data are skipped when running this macro?
Please Login or Register to view this content.
Hello does anyone know why some of the rows of data are skipped when running this macro?
Please Login or Register to view this content.
Can you give a description of what you are expecting this code to do, and specifically what you mean by "some of the rows of data are skipped"?
The use of multiple lines of code on a single line and GoTo statements make this code a bit obfuscated and are not considered good coding practices. This makes the code more difficult to analyze for functionality and bugs. I would rewrite the code like this, which I think is logically equivalent, but I'm not 100% sure what you want it to do:
Please Login or Register to view this content.
Thanks for replying. I want the code to copy rows to the correct month based on the 'Date In'.
I appreciate any help or suggestions.
This is the workbook and it shows in JAN sheet how some of the rows are skipped.
Thanks Jeff
I didn't try to patch your existing code, I just rewrote it. Also, I recommend you use Option Explicit to guarantee that all variables are declared.
The rows are duplicated with different IDs if selected again. Data will be entered on the Master sheet daily so if can tweak it to avoid duplicates I appreciate it. The ID numbers are meant to stay with the row records please.
This works if the ID's are unique and sequential:
@ Jeff - Sorry you don't like my codePlease Login or Register to view this content.
Last edited by xladept; 12-22-2017 at 02:07 PM.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
I tried it thanks but if I click again it duplicates. Is there a way to prevent the rows that have been appended to not append again? I really appreciate the help.
This resolves it.
Please Login or Register to view this content.
If the value in Column C is unique then this will work:
* The column 1 entry on the master doesn't readPlease Login or Register to view this content.
@ Jeff - Interesting that we both used the finder to eliminate duplication
Thanks guys for the codes but both go to debugger. Could you try them to see if it's something I'm doing wrong?
This now works for unique ID's:
Please Login or Register to view this content.
Last edited by xladept; 12-22-2017 at 02:51 PM.
Very close it misses the first 2 rows and the 5th row.
Try it again - I just edited it
Perfect! Thank you so much for the fantastic support.
Merry Christmas and Happy New Year
Merry Christmas and thanks for the rep!
Here is my version implemented in your file, I didn't have a problem with it.
Thank you too Jeff for the help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks