VBAProIWish
Well-known Member
- Joined
- Jul 6, 2009
- Messages
- 1,027
- Office Version
- 365
- Platform
- Windows
Hello all,
After 1 hour of frustrating searching, I gave up and decided to go to the experts. I got every answer known to mankind except the one that I need.
In column B, I have several rows of data. They can be any combination and in any order of numbers, letters, dashes and spaces.
For example,
I might have 125-2D3 , but it has a space at the end, so it's actually 125-2D3"space"
I could also have D25 429T"space" (note that there is also a space between the "5" and the "4", but I don't want that deleted), only the space at the end.
I need VBA code that only removes any space after the last non-space character, but I need to apply it to an entire column (except row 1)
I suppose you could create the code to delete all spaces after the last non-space character, but I think I will be ok with it only searching for one space.
Thanks much
After 1 hour of frustrating searching, I gave up and decided to go to the experts. I got every answer known to mankind except the one that I need.
In column B, I have several rows of data. They can be any combination and in any order of numbers, letters, dashes and spaces.
For example,
I might have 125-2D3 , but it has a space at the end, so it's actually 125-2D3"space"
I could also have D25 429T"space" (note that there is also a space between the "5" and the "4", but I don't want that deleted), only the space at the end.
I need VBA code that only removes any space after the last non-space character, but I need to apply it to an entire column (except row 1)
I suppose you could create the code to delete all spaces after the last non-space character, but I think I will be ok with it only searching for one space.
Thanks much