Why don't you use Macro to do this all because using formula it's taking so long to calculate the data as the data is huge.