Remove dash(s)
Pierre
I got this to work...
=IF(SEARCH("-",A1,1)=LEN(A1)-2,SUBSTITUTE(A1,"-",""),A1)
Beege
"Pierre" wrote in message
ups.com...
Maybe someone here could provide guidance:
Have a column containing data which may have 1-3 dashes locates within
each cell value.
Such as:
125-457A
158-857-1116
124184A-1
125-8745-22D9
458-2145-002-7
Would like to remove all the dashes "unless" the last dash to the right
is followed by a just a single digit. The results would be as follows:
125457A
1588571116
124184A-1
125874522D9
4582145002-7
On the example data, it kept 2 of the dashes in the cell values,
because the were only one digit away from the extreme right, but
removed all others.
TIA for any thoughts.
Pierre
|