
Sub Macro2()
'
' Macro2 Macro
'
'
Range("I5:Q17").Select
Selection.Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub |
Option Explicit
Sub Valuta_€()
Dim celle As Range
Dim cella As Variant
Dim Rig, Col As Long
Set celle = Range("I5:Q17")
With Application
For Each cella In celle
Rig = cella.Row
Col = cella.Column
Cells(Rig, Col).NumberFormat = "$ #,##0.00"
Cells(Rig, Col) = .Substitute(.Substitute(cella, ",", ""), ".", ",") * 1
Next
End With
Set celle = Nothing
End Sub
|
Option Explicit
Sub Valuta_€()
Dim celle As Range
Dim cella As Variant
Dim Rig, Col As Long
Set celle = Range("I5:Q17")
With Application
For Each cella In celle
If IsNumeric(cella) And cella <> "" Then
Rig = cella.Row
Col = cella.Column
Cells(Rig, Col).NumberFormat = "$ #,##0.00"
Cells(Rig, Col) = .Substitute(.Substitute(cella, ",", ""), ".", ",") * 1
End If
Next
End With
Set celle = Nothing
End Sub
|
Option Explicit
Sub Valuta_€()
Dim celle As Range, cella As Range
Set celle = Range("I5:Q17")
With Application
For Each cella In celle
If IsNumeric(cella) And cella <> "" Then
cella.NumberFormat = "$ #,##0.00"
cella = .Substitute(.Substitute(cella, ",", ""), ".", ",") * 1
End If
Next
End With
Set celle = Nothing
End Sub
|
