View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default Remove Punctuation?

kcoakley wrote...
Is there a simple way to strip a text cell of all its punctuation?


An alternative add-in is Laurent Longre's MOREFUNC.XLL add-in, freely
available from

http://xcell05.free.fr/english/

It's REGEX.SUBSTITUTE function could be used in formulas like

=REGEX.SUBSTITUTE(A1,"[^0-9A-Za-z ]+")

to produce the text from cell A1 stripped of any characters that aren't
numerals, letters or spaces. Or you could specify the punctuation to be
removed,

=REGEX.SUBSTITUTE(A1,"[\-\[\]\^\\`~!@#$%&*()_=+{}|;:'"",<./?]+")