Do you manage to make this macro faster??
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 |
Do you manage to make this macro faster??
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 "Fingerjob" wrote: 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 |
Do you manage to make this macro faster??
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: 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 "Fingerjob" wrote: 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 |
Do you manage to make this macro faster??
Maybe turning calculation to manual
then your code then back to automatic (or whatever it was before) would speed things up. Fingerjob wrote: 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 -- Dave Peterson |
Do you manage to make this macro faster??
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 "=" "Dave Peterson" wrote: Maybe turning calculation to manual then your code then back to automatic (or whatever it was before) would speed things up. Fingerjob wrote: 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 -- Dave Peterson |
All times are GMT +1. The time now is 01:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com