Hi salmasaied,
I apologize for the slow response. I did not forget you. I was very busy.
Try the following macros included in the attached file. The original software took 2 seconds for 200 data rows on my 10 year old computer. This software takes 11 seconds for 40,000 data rows. I don't think I can improve performance on what I've done.
Instead of arrays, I took advantage of the Excel 'AutoFilter' capability. However, their was a limitation, because 'AutoFilter' does not like 'Merged Cells'. I removed the 'Merged Cells' and double the height of row 6, and made the height of row 7 ZERO. The look and feel of the Workbook remains the same. I changed to orientation of the sheets to 'Left to Right'. I am not used to 'Right to Left', and it gave me a headache.
In an ordinary code module:
Lewis
Bookmarks