Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Increase Speed

Hi There,

Normally underneath macro runs quite smoothly.
But sometimes this macro takes ages to complete...not that it bugs but
the calculation speed is like litterally 100 times slower. (for the
same range-sizes!)
All I can do is Close Excel and restart the marco ... to let it run at
normal speed.
Any Ideas? -For Improvement?

Option Explicit

Sub BlanksToNumbers()
Dim r As Range
Dim w As Worksheet
On Error GoTo err
Application.ScreenUpdating = False
For Each w In ActiveWorkbook.Worksheets
For Each r In w.UsedRange.Cells
r.Cells.Font.Name = "Arial"
If r.Text = "" And r.Formula = "" Then r.Value = ""
Next r
Next w
Application.ScreenUpdating = True
err:
End Sub

Cheers, Sige

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Increase Speed

and for the rest of the sheets?

--
Don Guillett
SalesAid Software

"Jef Gorbach" wrote in message
...
or for speed, skip the selecting:

sub chgfontname()
sheets(1).font.name="arial"
end sub

"Don Guillett" wrote in message
...
or
Sub chgfontname()
Sheets.Select
Cells.Select
Selection.Font.Name = "arial"
Range("a1").Select
Sheets(1).Select
End Sub

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
this should change the font for the entire workbook which should be

better
than changing part of each worksheet.

Sub changefontinworkbook()
Sheets.Select
Sheets(1).Activate
Cells.Select
With Selection.Font
.Name = "arial"
End With
Range("A1").Select
Sheets(1).Select
End Sub

--
Don Guillett
SalesAid Software

wrote in message
oups.com...
Hi There,

Normally underneath macro runs quite smoothly.
But sometimes this macro takes ages to complete...not that it bugs

but
the calculation speed is like litterally 100 times slower. (for the
same range-sizes!)
All I can do is Close Excel and restart the marco ... to let it run

at
normal speed.
Any Ideas? -For Improvement?

Option Explicit

Sub BlanksToNumbers()
Dim r As Range
Dim w As Worksheet
On Error GoTo err
Application.ScreenUpdating = False
For Each w In ActiveWorkbook.Worksheets
For Each r In w.UsedRange.Cells
r.Cells.Font.Name = "Arial"
If r.Text = "" And r.Formula = "" Then r.Value = ""
Next r
Next w
Application.ScreenUpdating = True
err:
End Sub

Cheers, Sige









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 do I increase speed of arrow buttons to move from cell to cel. frustrated financial person Excel Discussion (Misc queries) 2 November 19th 08 09:18 PM
Increase Speed of Calculations bob Excel Worksheet Functions 1 November 17th 08 08:56 PM
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
How to increase calculations speed in pivot table with calculated fields & items [email protected] Excel Discussion (Misc queries) 0 August 4th 06 09:25 AM
Increase macro speed? Valeria Excel Programming 7 February 14th 05 08:11 AM


All times are GMT +1. The time now is 03:18 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"