LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Help needed with Very slow code Please

Hi all,

Can anybody tell me why this code is so slow ?

the rows of the sheet could be from 10 to over 20,000

Sub InsertColumns()
'
Columns("L:L").Insert Shift:=xlToRight
Range("L11") = "Age of Car" & Chr(10) & "(Days)"
Columns("L:L").ColumnWidth = 11
Columns("L:L").NumberFormat = "0.00"
Columns("O:O").Insert Shift:=xlToRight
Range("O11") = "Responsible QMT"
Columns("O:O").ColumnWidth = 25
Columns("Z:Z").Insert Shift:=xlToRight
Range("Z11") = "Rand"
Columns("Z:Z").NumberFormat = "$ #,##0.00"
Columns("AB:AB").Insert Shift:=xlToRight
Range("AB11") = "Rand"
Columns("AB").NumberFormat = "$ #,##0.00"
Columns("AD:AD").Insert Shift:=xlToRight
Range("AD11") = "Rand"
Columns("AD").NumberFormat = "$ #,##0.00"
Columns("AF:AF").Insert Shift:=xlToRight
Range("AF11") = "Rand"
Columns("AF").NumberFormat = "$ #,##0.00"
Columns("AH:AH").Insert Shift:=xlToRight
Range("AH11") = "Rand"
Columns("AH").NumberFormat = "$ #,##0.00"
Columns("AJ:AJ").Insert Shift:=xlToRight
Range("AJ11") = "Rand"
Columns("AJ").NumberFormat = "$ #,##0.00"
Columns("AL:AL").Insert Shift:=xlToRight
Range("AL11") = "Rand"
Columns("AL").NumberFormat = "$ #,##0.00"
Range("A1").Select
PctDone = Counter + 0.33
Call UpdateProgress(PctDone)
InsertCarAge
End Sub


Thanks in advance for any help.


--
Les
 
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
expert help needed for better alternative to slow workbook timteebow66 Excel Worksheet Functions 3 March 25th 08 07:03 AM
Slow code Sandy Excel Programming 2 August 21st 07 10:45 AM
very slow code andy62 Excel Programming 4 August 2nd 07 03:54 AM
Slow code when used as VBA code instead of macro (copying visible columns) [email protected] Excel Programming 3 April 2nd 07 05:26 PM
Excel Experts Needed: Marcors on Shared Documents are slow.... [email protected] Excel Programming 1 September 26th 06 07:35 PM


All times are GMT +1. The time now is 12:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"