Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Macro to Convert Value to Number, Sort, then Delete

Hi Dan,

This is my final version:

Declare Function timeGetTime Lib "winmm.dll" () As Long


Sub cardan()
'
' cardan Macro
'
Const WSnames As String = _
"Sheet1,Sheet2,Sheet3,Sheet4,Sheet5," & _
"Sheet6,Sheet7,Sheet8,Sheet9,Sheet10"

Dim lngStart As Long
Dim lngEnd As Long
Dim WS As Worksheet

lngStart = timeGetTime
'
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each WS In Worksheets(Split(WSnames, ","))
WS.Activate
Range("A5").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.AutoFilter
Range("A6").Select
ActiveSheet.Range("$A$1:$CC$8001").AutoFilter _
Field:=1, Criteria1:="Delete"
While UCase(ActiveCell.Text) < "DELETE"
ActiveCell.Offset(1, 0).Select
Wend
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter
Range("A5").Select
Next
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

lngEnd = timeGetTime

MsgBox lngEnd - lngStart & " milliseconds"


End Sub


The message box should appear after all tabs are processed.


HTH,

Wouter
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
Convert (-) to a (+) number Macro Nikki Excel Programming 5 December 12th 09 02:12 PM
Macro to convert phone number to time zone LindaC Excel Programming 1 February 5th 09 06:51 AM
need help with macro to convert number to date Dagonini Excel Programming 2 November 8th 06 08:15 PM
error convert to number macro cherrynich Excel Programming 3 January 19th 06 01:26 PM
Convert a number formatted as text to a number in a macro MACRE0[_5_] Excel Programming 2 October 22nd 05 02:51 AM


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