Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
i need to create a macro that will remove leading and ending extra spaces
without disturbing a leading "0" of a number in a cell eg. 03222 should remain the same n not 3222 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
use TRIM
"scharee" wrote in message ... i need to create a macro that will remove leading and ending extra spaces without disturbing a leading "0" of a number in a cell eg. 03222 should remain the same n not 3222 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try the below and feedback..
Sub Macro() Dim cell As Range For Each cell In ActiveSheet.UsedRange If Not cell.HasFormula Then cell.Value = Trim(cell.Text) Next End Sub If this post helps click Yes --------------- Jacob Skaria "scharee" wrote: i need to create a macro that will remove leading and ending extra spaces without disturbing a leading "0" of a number in a cell eg. 03222 should remain the same n not 3222 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Removing leading and trailing space... | Excel Discussion (Misc queries) | |||
Excel - How do I keep an ending space in a cell? i.e. "Mr. " | Excel Discussion (Misc queries) | |||
how do I delete a leading space in a whole lot of cells? | Excel Discussion (Misc queries) | |||
Remove leading space | Excel Worksheet Functions | |||
Paper Space / Model Space ? | Excel Discussion (Misc queries) |