Hope T-p
Hope T-p

Reputation: 159

How to delete Certain Characters in a excel 2010 cell

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

[John Smith]

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

Upvotes: 15

Views: 198172

Answers (3)

zx8754
zx8754

Reputation: 56219

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)

Upvotes: 1

jrad
jrad

Reputation: 3190

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.

Upvotes: 27

István Hirsch
István Hirsch

Reputation: 122

Replace [ with nothing, then ] with nothing.

Upvotes: 2

Related Questions