Results 1 to 12 of 12

Slow Macro Modify

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Post Slow Macro Modify

    dear friends below two macro i want to run one time.for that i have used " call " function.this macro work fine but very slow.pls any body can combined this two macros & remake to work fast.thanks.
    Sub Sticker()
    Dim LR As Long, i As Long
    LR = Range("C" & Rows.Count).End(xlUp).Row
    For i = 2 To LR
        If Range("E" & i).Value <> "" Then Range("H" & i).ClearContents
        If Range("C" & i).Value = "AMBATTUR B" Then
            With Range("D" & i)
                If InStr(.Value, "-") <> 0 Then .Value = Right(.Value, Len(.Value) - InStr(.Value, "-"))
            End With
        End If
    Next i
    
    Call Lotremove
    
    End Sub
    Sub Lotremove()
    
    Dim cell As Range
    For Each cell In Range("M3", Range("M" & Rows.Count).End(xlUp))
        cell.Value = Val(cell.Value)
        cell.Offset(0, -7).NumberFormat = "0"
    Next cell
    
    Dim LastRow As Long, r As Range
    LastRow = Range("L" & Rows.Count).End(xlUp).Row
    On Error Resume Next
    Set r = Range("E3:E" & LastRow & ",H3:H" & LastRow).SpecialCells(xlCellTypeBlanks)
    
    If Not r Is Nothing Then r.FormulaR1C1 = "'"
    On Error GoTo 0
    End Sub
    Last edited by johncena; 04-06-2010 at 12:40 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1