View Single Post
 
Old 02-21-2018, 05:58 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Need to change the range of cells to look at,
give this a try
Code:
Sub RemoveParenth_2()

    Dim rng As Range, cel As Range
    Dim lr As Long, arr As Variant
    
lr = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
Set rng = Union(Range("A1:A" & lr), Range("B1:B" & lr), Range("J1:J" & lr))

For Each cel In rng
    If InStr(1, cel.Value, "(") > 0 And InStr(1, cel.Value, ")") > 0 Then
        arr = Split(Replace(Replace(cel.Value, "(", "|"), ")", "|"), "|")
        cel.Value = Trim(arr(0) & arr(2))
    End If
Next cel
End Sub
Reply With Quote