Hi,

I already have a macro that I got from here that transposes duplicate rows to columns.

Please Login or Register  to view this content.
The problem is I've multiple spreadsheets with 600,000+ rows, and when I select all the rows and run the macro, I get 'Out of Memory' error.

Can someone help me modify the macro so that it runs every 5000 cells and loop. I think that way it won't run in to the previous error.

I've a feeling that this is super simple but I'm newbie to VBA.