Results 1 to 9 of 9

Speed Up Loop in VBA

Threaded View

  1. #1
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Speed Up Loop in VBA

    All,

    Is there a faster way to perform the following two loops?

        Dim i As Long
        Dim j As Long
    
            'Combine Project Number and Job Number
            For i = 1 To 100
                If Range("D" & i).Value = "" Then GoTo Nexti
                If Range("A" & i).Value = "" And Range("B" & i).Value = "" And Range("C" & i).Value = "" And Range("D" & i).Value <> "" Then
                    Range("D" & i - 2).Value = Range("D" & i).Value & " / " & Range("D" & i - 2).Value
                    End If
    Nexti:
                Next
    
            'Move Piece Counts + Frame Weight to job information row
            For j = 1 To 100
            If Range("A" & j).Value = "" Then GoTo Nextj
                If Range("A" & j).Value <> "" And Range("E" & j).Value <> "" Then
                    Range("G" & j).Value = Range("G" & j + 1).Value 'BuiltUp
                    Range("H" & j).Value = Range("H" & j + 1).Value 'HotRolled
                    Range("I" & j).Value = Range("I" & j + 1).Value 'ColdFab
                    Range("J" & j).Value = Range("J" & j + 1).Value 'HotDip
                    End If
    Nextj:
                Next
    Last edited by PY_; 07-19-2013 at 08:57 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help Speed up this Loop?!?
    By arleutwyler in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-06-2013, 01:49 AM
  2. Speed up a VLookUp loop
    By wizuriel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-11-2013, 07:28 PM
  3. Loop alternatives or improvement for speed
    By TommyN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 06:00 PM
  4. Speed Up VBA Loop Code
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 12-30-2012, 07:20 PM
  5. Trying to speed up the calculation my For Loop
    By Astroboy142 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2010, 04:32 AM

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