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
edit: updated code - tyeler
Comments
Post a Comment