Do you manage to make this macro faster??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This marco take over 1 min to run for me....
Does anybody have clue if i can get the run time down.

Br

Petter


Sheets("Sheet2").Select
For i = 0 To 92
rownr = 105 - i
Fjern = Cells(rownr, 6).Value
If Fjern = "Order backlog" Or Fjern = "Orders received" Then
Else: Range("e" & rownr & ",g" & rownr & ",k" & rownr & ":m" &
rownr).ClearContents
End If
Next i
 
A lot would depend on what the macro does after the THEN statement. The one
you posted below goes straight to an ELSE statement. Post the correct macro.

Mike
 
Hi

This is the whole macro. There should not be anything after the THEN
statement since i dont want the macro do anything if the IF statment is true.
I just want the macro to do something if the Statment is NOT true ( else:
statmentet)

Br

Petter

Mike H skrev:
 
Maybe turning calculation to manual
then your code
then back to automatic (or whatever it was before)

would speed things up.
 
Not sure if it will speed up your macro, but if you want to know if something
is not equal, you may want to use "<>" instead of "="
 

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

Back
Top