![]() |
|
#7
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to remove first 12 characters of each cell | King Mustard | Excel | 3 | 04-07-2017 12:06 AM |
| Can I remove spaces between only Chinese characters? | sivartnosredna7 | Word | 2 | 01-09-2017 05:33 AM |
How do I Remove A Specific Amount of Characters from Lines in a Document?
|
tatihulot | Word | 5 | 01-22-2016 05:55 AM |
| Find and Replace Parenthesis with Itallics | Richard Carr | Word | 1 | 01-06-2015 06:44 PM |
| How to remove these unknown characters appearing | rajpes | Word | 1 | 03-02-2012 03:24 AM |