Thanks so much for replying.

There could be around 10,000 lines of data eventually, so I suspect a macro would be better as I can run it whenever required rather than have it running all the time and potentially crippling Excel. Do you agree?