#1   Report Post  
rn
 
Posts: n/a
Default Speed up macro

Hi

I am running a macro that copies a range from an open
workbook and paste it to another open one. When I run
the macro without vlookup function (in about 1000 cells
on the paste sheet the macro completes instantly, but
with it takes much longer. Is there any way I can speed
up the macro without sacrificing what the function of the
vlookup?

Thanks.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

It would help to see the code, but at the very least, pre-pend the code with

Application.DisplayAlerts = False
Application.Calculation = xlCalculateManual

and appened this

Application.Calculation = xlCalculateAutomatic
Application.DisplayAlerts = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"rn" wrote in message
...
Hi

I am running a macro that copies a range from an open
workbook and paste it to another open one. When I run
the macro without vlookup function (in about 1000 cells
on the paste sheet the macro completes instantly, but
with it takes much longer. Is there any way I can speed
up the macro without sacrificing what the function of the
vlookup?

Thanks.



  #3   Report Post  
rn
 
Posts: n/a
Default

Hi Thanks a lot for the suggestions. I appended my code
but I was hoping it would run much faster. The problem
does not seem to be with the code but with the vlookup
function. When I run the macro but deleting the vlookup
fuction it completes nearly as fast as just a simple copy
and paste.



-----Original Message-----
It would help to see the code, but at the very least,

pre-pend the code with

Application.DisplayAlerts = False
Application.Calculation = xlCalculateManual

and appened this

Application.Calculation = xlCalculateAutomatic
Application.DisplayAlerts = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"rn" wrote in

message
...
Hi

I am running a macro that copies a range from an open
workbook and paste it to another open one. When I run
the macro without vlookup function (in about 1000 cells
on the paste sheet the macro completes instantly, but
with it takes much longer. Is there any way I can

speed
up the macro without sacrificing what the function of

the
vlookup?

Thanks.



.

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

The time is probably taken by al the VLOOKUPs taking time to resolve. If the
suggestions don't improve it, then because it is just a paste job, then
there is probably no savings that can be made.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"rn" wrote in message
...
Hi Thanks a lot for the suggestions. I appended my code
but I was hoping it would run much faster. The problem
does not seem to be with the code but with the vlookup
function. When I run the macro but deleting the vlookup
fuction it completes nearly as fast as just a simple copy
and paste.



-----Original Message-----
It would help to see the code, but at the very least,

pre-pend the code with

Application.DisplayAlerts = False
Application.Calculation = xlCalculateManual

and appened this

Application.Calculation = xlCalculateAutomatic
Application.DisplayAlerts = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"rn" wrote in

message
...
Hi

I am running a macro that copies a range from an open
workbook and paste it to another open one. When I run
the macro without vlookup function (in about 1000 cells
on the paste sheet the macro completes instantly, but
with it takes much longer. Is there any way I can

speed
up the macro without sacrificing what the function of

the
vlookup?

Thanks.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Can't get simple macro to run Abi Excel Worksheet Functions 5 January 12th 05 07:37 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro Formula revision? Mark Excel Worksheet Functions 1 November 28th 04 01:43 AM


All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"