By: Shamima Sultana

In reply to Bleona.

Hello Bleona,

You can fix the runtime error 6 overflow by handling the large dataset more efficiently. Since you have over 1 million rows, Excel may be exceeding its memory limits. You can follow these steps:
1. Use smaller data batches for processing.
2. Switch from Integer to Long data types in your VBA code, as Integer can only handle values up to 32,767.
3. Consider using Power Query for merging large datasets instead of VBA, as it handles large data better.

Regards
ExcelDemy