@KH

Writing 10^6 results into the workbook wont' be that tedious if we use an array of that size

redim kh(10^6,0)
cells(1).resize(10^6+1)=kh