Hello everyone! I have a mostly working VBA Macro in Excel 2016 and I was hoping you all could help me find my error. To be honest this is my first serious attempt at a Macro. The situation is that I have a long list of text where Column A has many groups of cells with the same text. I'm trying to insert a row at the end of each group of the same text.
For context, this is a list of database tables with DB columns and other properties, and the first row is the Spreadsheet column names frozen at the top. The original list is just over 36,000 lines, and the code ends up inserting a little under 3,000 rows.
The problem is that the second code block below mostly works in that most groups of texts are successfully separated by a blank row, but sometimes a row is not inserted. I don't see a pattern between the number of correct insertions and the number of failed insertions. I'm assuming that I have a simple formatting or logic error that I am not seeing. Any thoughts? Any help is greatly appreciated!
This code works, but I wanted to be thorough and add a check for existing empty rows to prevent 40,000 contiguous rows from being inserted.
This is the new code that I need help with. I have made multiple changes to the code order, and separated the nested IF statements, but so far no luck.
Bookmarks