Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Working of formula in Macro.

Hi,

I have written a macro which process around 50000 rows in a
spreadsheet and i have used VLOOKUP function in it. When i use this
function normally(I mean manually) it takes around 2 mins to pop-up
the values in spread sheet and macro process it in seconds. I just
wanted to know does that macro waits untill the data is populated or
not.

Regards
Heera Chavan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Working of formula in Macro.

hi,

Updating your worksheet 'on the fly' while running a macro causes everything
to slow down so it's often beneficial to stop it and also stop calculation
and re-start at the end like this

sub nn()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False

'Your code

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Heera" wrote:

Hi,

I have written a macro which process around 50000 rows in a
spreadsheet and i have used VLOOKUP function in it. When i use this
function normally(I mean manually) it takes around 2 mins to pop-up
the values in spread sheet and macro process it in seconds. I just
wanted to know does that macro waits untill the data is populated or
not.

Regards
Heera Chavan
.

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
VBA formula in macro not working Chloe Excel Discussion (Misc queries) 5 April 10th 08 05:48 PM
Formula within a Macro not working as expected. Pank New Users to Excel 2 March 7th 07 10:31 AM
Macro formula using MYDATE not working Bricktop Excel Programming 2 October 27th 05 07:50 PM
macro was working, now it's not working RichardO[_11_] Excel Programming 2 June 9th 04 06:27 AM
Macro working in Excel 2003; not working in Excel 2000 Leslie Barberie Excel Programming 5 May 20th 04 07:51 PM


All times are GMT +1. The time now is 06:11 AM.

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

About Us

"It's about Microsoft Excel"