Results 1 to 2 of 2

What goes between 2 macros so one runs right after the first?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    What goes between 2 macros so one runs right after the first?

    Sub test()
    Dim LR&, r&
    LR = Range("A" & Rows.Count).End(xlUp).Row
    For r = 8 To LR: Cells(r, 1) = "." & Cells(r, 1).Value & ".": Next
    End Sub
    
    Sub test()
    On Error Resume Next
    For Each r In Range("b8:b" & Cells(Rows.Count, 2).End(xlUp).Row)
        With Columns(1)
            Set c = .Find(r.Value, , , 2)
                If Not c Is Nothing Then
                    f = c.Address
                    Do
                        c.Value = Replace(c.Value, r.Value, r.Offset(, 1).Value)
                    Set c = .FindNext(c)
                    Loop Until f = c.Address
                End If
        End With
    Next
    End Sub
    Last edited by ILoveStMartin; 11-08-2012 at 01:09 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