View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default help to remove space before the data

Hi Ricky,

Am Sat, 23 Feb 2013 10:04:31 +0000 schrieb Ricky Martin:

many don't work, i dont know what happen but now i have 2 problem

and i upload it www.mediafire.com/view/?ecc71y94v1zihdw


try:
Find & Select = Replace = Find what: Alt+0160 = Replace with: nothing
= Replace All
or do it with VBA:

Sub RemoveSpaces()
Dim LRow As Long
Dim rngC As Range

LRow = Cells(Rows.Count, 1).End(xlUp).Row
With Range("A1:B" & LRow)
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.Orientation = 0
End With

For Each rngC In Range("A1:B" & LRow)
rngC = Replace(rngC, Chr(160), "")
Next
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2