15

In column A I have a load of name that look like this

[John Smith]

I still want them in A but the [] removed...

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Hope T-p
  • 159
  • 1
  • 1
  • 3
  • 5
    `SUBSTITUTE( text, old_text, new_text, [nth_appearance] )` i.e `=SUBSTITUTE(SUBSTITUTE(A1,"[",""),"]","")` – Skip Intro Jul 15 '13 at 11:33

3 Answers3

27

If [John Smith] is in cell A1, then use this formula to do what you want:

=SUBSTITUTE(SUBSTITUTE(A1, "[", ""), "]", "")

The inner SUBSTITUTE replaces all instances of "[" with "" and returns a new string, then the other SUBSTITUTE replaces all instances of "]" with "" and returns the final result.

jrad
  • 3,172
  • 3
  • 22
  • 24
2

Replace [ with nothing, then ] with nothing.

1

Another option: =MID(A1,2,LEN(A1)-2)

Or this (for fun): =RIGHT(LEFT(A1,LEN(A1)-1),LEN(LEFT(A1,LEN(A1)-1))-1)

zx8754
  • 52,746
  • 12
  • 114
  • 209