Hi Kamal,
Thanks for helping hand. I tested with your macro for 12000 rows. It
took about 9 mins. For the whole 50000 rows, this iteration will take
more than 30 mins. Already we in our existing process are using about
2 hours to create these 50,000 rows. This new solution would add 30
more mins. If we find a solution to reduce the CPU time to 15 mins, I
can use that solution. Again thanks for your help.
PMFJI, but you can do it in the worksheet instead of VBA:
250 columns is A:IP, so the following function in IQ1 would give the
figure you want:
=MAX(A1:IL1+B1:IM1+C1:IN1+D1:IO1+E1:IP1)/5
when array-entered (using shift+ctrl+enter)
So type that in IQ1 and copy it down the rest of the rows.
Regards
Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk