You need to adjust the ranges to suit your data!!! I only had 3 rows (A2:A4 and B2:B4). You will have to adjust it to suit you.

HOWEVER... with a lot of rows it will be slow. So. It might make more sense to break it up into several blocks of data that will put your processors under less strain.