ThrottleWorks
Excel Ninja
Hi,
I have a formula in cell A2.
I am pasting this formula in cell A2:A65000.
When I do it manually, excel takes 2-3 minutes to get refreshed and reflect values correctly.
When I do it with VBA, macro does not calculates entire column before triggering next line of code.
I have written activesheet.calculate 3-4 times in the code but still it does not help.
How do I overcome this problem.
I also tried to write a loop for this, but loop is taking too much time to complete.
Or is there any where I can store all the values from FOR EACH LOOP in an array and pass it with a single line once loop is complete
Can anyone please help me in this.
I have a formula in cell A2.
I am pasting this formula in cell A2:A65000.
When I do it manually, excel takes 2-3 minutes to get refreshed and reflect values correctly.
When I do it with VBA, macro does not calculates entire column before triggering next line of code.
I have written activesheet.calculate 3-4 times in the code but still it does not help.
How do I overcome this problem.
I also tried to write a loop for this, but loop is taking too much time to complete.
Or is there any where I can store all the values from FOR EACH LOOP in an array and pass it with a single line once loop is complete
Can anyone please help me in this.
Code:
For Each TRng In TempRng
MySht.Cells(TRng.Row, 1).FormulaR1C1 = "=IF(AND(COUNTIFS(C[1],RC[1],C[9],""Y*""
>0,COUNTIFS(C[1],RC[1],C[9],""N*"")>0),""Yoyo"",""NoNo"")"
MySht.Cells(TRng.Row, 1).Value = MySht.Cells(TRng.Row, 1).Value
Next TRng
Last edited: