cancel
Showing results for 
Search instead for 
Did you mean: 

Remove additional spaces from string

Devendra_KumarP
Level 7
Hi All, 

There are multiple ways to remove additional spaces from a string. like split string by spaces then combine again with one space. Just wanted to check if there any other simple way to do this. 

Requirement - remove additional spaces from string.
Example - "Devendra        Kumar      Prajapati" should be converted to "Devendra Kumar Prajapati"

------------------------------
Devendra Kumar Prajapati
RPA Manager
Infosys
Chandigarh, India
------------------------------
Devendra Kumar Prajapati RPA Manager Infosys Chandigarh, India
1 REPLY 1

Satish1414
Level 4
Hi Devendra ,

34198.png
First check with InStr that if there are more than one extra space in the string (If "YES" InStr will return the position of the searched string)

34200.png

If yes use "Replace" the function to update the Name

34201.png

Hope this helps .


Regards,

Satish Gunturi

Senior Consultant

Ignite IPA Pvt Ltd.



------------------------------
Satish Gunturi
------------------------------