You are running out of memory because you are creating massive arrays in VBA when capturing and copying UsedRange. You may need to process one row at a time.
Hi Gary
I have 800K lines to work with so you suggesting the criteria should be use one at a time? Any ideas? and maybe you could ammend some of the script to make it work?
Bookmarks