VBA: AutoCalc

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,341
Office Version
  1. 365
Platform
  1. Windows
'=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(N11,ROW(Req_to_PO_Summary[PO_OrderReference])-ROW(N11),,1)), IF(Req_to_PO_Summary[PO_OrderReference]<>"",MATCH("~"&Req_to_PO_Summary[PO_OrderReference],Req_to_PO_Summary[PO_OrderReference]&"",0))),ROW(Req_to_PO_Summary[PO_OrderReference])-ROW(N11)+1),1))

I have the above formula in a couple of cells (looking at different rows) on one tab. Its dramatically slows down everything in my workbook - even just using a slicer takes forever. If I remove these formulas the same workbook runs very fast.

I would really hate to remove the formula because the data it produces is very valuable. I tried to find alternatives with no luck. Other formulas don't work when the data in the table is filtered.

I am trying to figure how if I can turn off the autocalc just for this one workbook and not other workbooks that may be open by the user. for this workbook I was thinking I only reclac when on the one tab that has these formulas on it either when that tab is active or even add a button to calc on demand only. Any suggestions are appreciated.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
stick this in each worksheet
VBA Code:
Sub worksheet_activate()
    Application.Calculation = xlCalculationManual  ' or xlAutomatic as required
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top