Add a space after 3 characters in excel by VBA -


is there function add space after every 3 character in excel vba? name of column header "post"

what have tried? 1 way go - note: it's check understand code before using it

function addspace(rng range) string     dim integer     dim str string      = 1 len(rng.value) step 3        str = str & " " & mid(rng.value, i, 3)     next      addspace = mid(str, 2) end function 

for string in cell a1, use formula =addspace(a1) split string required. example below

enter image description here

edit: updated code - tyeler


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -