Hi,
pls. can you help me?
what is wrong in this code?
i want in all selected number substitute "." with blank, multiply all selected cells with 1 and give this number format #,##0.00
but it works only for last selected cell
pls. what is wrong?
Sub form_number()
'
' Macro recorded 2.3.2009 by Gálisová
Const erate = 1
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Selection
Selection.Replace What:=".", Replacement:="", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Rem Cells.Replace What:=".", Replacement:="", LookAt:=xlPart, SearchOrder:= _
rem xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
If IsNumeric(cell.Value) And LenB(cell.Value) Then cell.Value = cell.Value * erate
Next cell
Application.ScreenUpdating = True
Selection.NumberFormat = "#,##0.00"
End Sub
Bookmarks