Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2000 VBA - Using Split() with no delimiter in string

Try this. I haven't tested it, but it works in theory and it should b
quite a bit faster:

Sub NumberMassage()
Application.ScreenUpdating = False
Range("A:E").Sort Key1:=Range("A1"), Order1:=xlDescending
While Cells(1, 1).Value 9999999
badNum = Cells(1, 1).Value
newNum = Left(badNum, 7)
badNum = Trim(Right(badNum, Len(badNum) - 7))
ActiveCell.Value = badNum
Rows(1).Copy
Rows(1).Insert
Cells(1, 1).Value = newNum
Wend
Range("A:E").Sort Key1:=Range("A1"), Order1:=xlDescending
Application.ScreenUpdating = True
End Sub

I should add that the reason it should be faster is that selectin
cells takes up alot of time when you do it as many times as you will b
here and updating the screen with every one of those changes takes LOT
of time. By not updating the screen and avoiding unnecessar
selections you can increase your speed immensely. - piku

--
Message posted from http://www.ExcelForum.com

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
excel 2000-split a cell or a column or a row without transferring Esther New Users to Excel 5 August 1st 08 08:31 PM
Excel 2000 - Split Contents of Cell Across Multiple Cells DeeW Excel Discussion (Misc queries) 7 November 8th 06 09:10 PM
how can I split a single cell diagonally in Excel 2000 Forrest Excel Discussion (Misc queries) 2 January 27th 05 11:47 PM
In Excel 2000, how do I add a vertical scroll bar to a split scre. Lisa_196 Excel Discussion (Misc queries) 1 January 13th 05 09:12 PM
Excel 2000 - Page break so group of rows not split (VBA?) WP Excel Programming 2 September 11th 03 02:30 AM


All times are GMT +1. The time now is 07:29 PM.

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"