Working of formula in Macro.

H

Heera

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
 
M

Mike H

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top