Remove extra space in middle of text

J

JS

I have a field that has 2 spaces in the middle in some of the fields that are
in a table. For example... Accounting--(0001), where a - represents a single
space. some others do not have the 2 spaces... Marketing-(0002) I tried
using the following trim formula but it doesn't trim it down for me.
=trim([field name]) Any suggestions?
 
M

Michael Gramelspacher

I have a field that has 2 spaces in the middle in some of the fields that are
in a table. For example... Accounting--(0001), where a - represents a single
space. some others do not have the 2 spaces... Marketing-(0002) I tried
using the following trim formula but it doesn't trim it down for me.
=trim([field name]) Any suggestions?

?Replace("Accounting--(0001)","--","-")
Accounting-(0001)

?Replace("Marketing-(0002)","--","-")
Marketing-(0002)

?Replace("New York"," "," ")
New York

try it in immediate window.
 
Top