Results 1 to 7 of 7

Search and replace in multiple columns

Threaded View

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    8

    Search and replace in multiple columns

    Hello
    What I need to do is replace a bullet symbol in multiple columns with text from row 2 of that column (Bullets in column c get replaced with text from c2)and then re-format that column to Arial 10 pt font.
    I can do it with this macro one column at a time but would like to do it all in one step. If possible I would also like to be able to loop though all worksheets (approx 19) and do the same on each sheet.
    Sub Find_Replace2()
        Dim SFind As String
        Dim SReplace As String
        
        SFind = "*·*" 'Find Bullet
        SReplace = Range("G2").Value 'Replacement value
    
        Range("G5:G100").Replace _
            What:=SFind, Replacement:=SReplace, _
        LookAt:=xlWhole, MatchCase:=False
        'Reformat font to Arial
         Columns("G:G").Select
        With Selection.Font
            .Name = "Arial"
            .Strikethrough = False
            .Superscript = False
            .Subscript = False
            .OutlineFont = False
            .Shadow = False
            .Underline = xlUnderlineStyleNone
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .ThemeFont = xlThemeFontNone
        End With
        Columns("G:G").EntireColumn.AutoFit
    End Sub
    I hope this is clear enough and thanks in advance for any help

    Cheers

    Alan
    Last edited by arlu1201; 03-26-2012 at 03:30 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