Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I find first space in my string and replace it with something else.
Thank you.
May be this
Replace(String, ' ', '@')
May be like:
=SubField(String, ' ',1) & 'ReplaceString' & Mid(String,Index(String,' ')+1)
However, an easier solution could be there. If hits, would let know.
if (left(string,1)=" ",then
Seems, Working this?
=SubField('Sa mpl e', ' ',1) & 'WEE' & Mid('Sa mpl e',Index('Sa mpl e',' ')+1)
From the array of possible solutions, here's another one:
=Left(String, Index(String, ' ')-1) & 'Substitute' & Right(String, Len(String)-Index(String, ' '))
Probably the only bonus is that this expression uses Left() for the left part, and Right() for the right part
If you prefer to first check for the occurrence of a space, you may want to do it like this:
=IF (Index(String, ' ') = 0,
String,
Left(String,Index(String,' ')-1) & 'Substitute' & Right(String,Len(String)-Index(String,' ')))