Macro running time

Dota2014

New Member
Joined
Sep 29, 2014
Messages
41
Hi all,


I was just wondering if anyone experienced something similar. The time required for running one of my Macros is around 30 seconds, but sometimes it took as long as 30 minutes. And then other times it took only 30 seconds. Anyone happens to know why so?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
18,144
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi all,


I was just wondering if anyone experienced something similar. The time required for running one of my Macros is around 30 seconds, but sometimes it took as long as 30 minutes. And then other times it took only 30 seconds. Anyone happens to know why so?
Hard to say without seeing the macro and knowing what the workbook(s) it operates on contains.
 
Upvote 0

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
18,144
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Any common causes?
Poorly constructed code, failure to turn off calculations in formula-heavy workbooks, failure to turn off screen updating, failure to disable events (if any) while code is executing ........
 
Upvote 0

Dota2014

New Member
Joined
Sep 29, 2014
Messages
41
Poorly constructed code, failure to turn off calculations in formula-heavy workbooks, failure to turn off screen updating, failure to disable events (if any) while code is executing ........

I don't know about poorly constructed codes, but other categories you have mentioned were under control.

It just that it took 30 minutes to run the Macro yesterday. I ran the same Macro today, and it only took 30 seconds. Nothing have changed.

If my codes were bad, then shouldn't it take 30 minutes each time?

Thanks for your input btw.
 
Upvote 0

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
18,144
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I don't know about poorly constructed codes, but other categories you have mentioned were under control.

It just that it took 30 minutes to run the Macro yesterday. I ran the same Macro today, and it only took 30 seconds. Nothing have changed.

If my codes were bad, then shouldn't it take 30 minutes each time?

Thanks for your input btw.
Depends on what other workbooks are open, what's in them, other applications that are open, .........
30 seconds to 30 minutes is a big swing.
 
Upvote 0

Forum statistics

Threads
1,195,922
Messages
6,012,313
Members
441,690
Latest member
CyberWrek

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
Top