hi thanks a lot its working very well when integrated on the planning system and its not freezing.

by the way i have been going through the code and there is part which i don't understand on that can you please explain it to me so that i later use on other system .

the 1st part
ModuleData = Application.Transpose(.Cells(theRange.Row, ModuleColmNo).Resize(rowMax))

what this is actually doing before the calculation.

2nd part :
Else
If Cells(33, SheetColm) < Cells(SheetRow, 15) Then
myArray(rw, Colm) = 0

why cells(33, ) and cells( , 15 ) has been used.

as for others i have been able to figure out.
thanking you in advance for your help.