Reputation: 159
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
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
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