0

I have to Trim a cell value thru macro. I have a cell where I am getting a value like "20170411 675432". Here you can see there a space in between 1 and 6. I want to remove that space so that I can get the field value as "20170411675432" Thanks

2 Answers2

2

Try this:

Function trimacelll(cellalue As Variant)
    trimacelll = Replace(CStr(cellalue), " ", "")
End Function
0

Posting this as you have asked for a formula,

=SUBSTITUTE(A1," ","")

A1 should contain the value

Gowtham Shiva
  • 3,802
  • 2
  • 11
  • 27