I have a spreadsheet (over 100,000 rows) with 10 columns of data. Two of the columns have comma separate value entries. I need a macro (or series of macros) or VBA script that can automatically duplicate the existing rows of data yet only have a single entry for each such comma separated value entry.
So today I have in a single row, columns A-D:
A B C D John | Smith | Virginia | Apples, Bananas, Grapes, Mangoes
And I want:
A B C D John | Smith | Virginia | Apples John | Smith | Virginia | Bananas John | Smith | Virginia | Grapes John | Smith | Virginia | Mangoes
I need the macro to be "smart enough" to only create duplicate rows for the number of entries in the CSV cell. So, in my example, I had 4 fruit names. If I had 17 fruit names, I'd want 17 rows, each with a single instance of each fruit. If there are two identical fruit names, that's okay - I can live with two duplicate rows of the same exact fruit name.
Advice on how to accomplish this? I'm tried to parse text to columns but don't know enough about macro programming to do this.