![]() |
An easy way to delete spaces in a cell...
I have a list of numbers which are written with a space between each set of
numbers. Example: In cell A1 is: 12 13 14 15, in cell A2 is 23 16 17 00 and so on. Is there an easy way to delete all the spaces so the end result is 12131415 and 23161700? With either a formula, a macro, or a VBA module..... -- LEG |
An easy way to delete spaces in a cell...
Sub replaceblank()
For Each c In Selection c.Value = Replace(c, " ", "") Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "LEG" wrote in message ... I have a list of numbers which are written with a space between each set of numbers. Example: In cell A1 is: 12 13 14 15, in cell A2 is 23 16 17 00 and so on. Is there an easy way to delete all the spaces so the end result is 12131415 and 23161700? With either a formula, a macro, or a VBA module..... -- LEG |
An easy way to delete spaces in a cell...
Thanks ever so much. It worked!
-- LEG "Don Guillett" skrev: Sub replaceblank() For Each c In Selection c.Value = Replace(c, " ", "") Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "LEG" wrote in message ... I have a list of numbers which are written with a space between each set of numbers. Example: In cell A1 is: 12 13 14 15, in cell A2 is 23 16 17 00 and so on. Is there an easy way to delete all the spaces so the end result is 12131415 and 23161700? With either a formula, a macro, or a VBA module..... -- LEG |
All times are GMT +1. The time now is 08:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com