Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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

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
How can make Save faster clara Excel Programming 0 March 21st 07 08:17 PM
can you make this faster? John Excel Programming 2 October 25th 05 08:20 PM
How Can I make excel go faster Jason Zischke Excel Programming 8 March 23rd 05 03:55 PM
make my vba/excel program faster Frank Kabel Excel Programming 0 May 18th 04 04:58 PM
make my VBA program faster Neil[_14_] Excel Programming 2 May 18th 04 04:15 PM


All times are GMT +1. The time now is 04:23 PM.

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"