Gnanaprakash1
New Member
- Joined
- Mar 18, 2019
- Messages
- 2
Dear Friends,
Need help from you, i am trying to convert Dot to comma and when i covert the value decimal points are not appearing example attached and given below as well.
When the third decimal point if is zero then i am not getting the third decimal after i convert example below.
Input : 223.330 Output should be 223,330 but output is coming like 223,33
Code what i used
Sub replace()
Const sTEMPCOMMA = "|comma|"
Const sTEMPDOT = "|dot|"
Const sCOMMA = ","
Const sDOT = "."
If TypeName(Selection) = "Range" Then
With Selection
.replace sCOMMA, sTEMPCOMMA, xlPart
.replace sDOT, sTEMPDOT, xlPart
.replace sTEMPCOMMA, sDOT, xlPart
.replace sTEMPDOT, sCOMMA, xlPart
End With
End If
End Sub
Need help from you, i am trying to convert Dot to comma and when i covert the value decimal points are not appearing example attached and given below as well.
When the third decimal point if is zero then i am not getting the third decimal after i convert example below.
Input : 223.330 Output should be 223,330 but output is coming like 223,33
Code what i used
Sub replace()
Const sTEMPCOMMA = "|comma|"
Const sTEMPDOT = "|dot|"
Const sCOMMA = ","
Const sDOT = "."
If TypeName(Selection) = "Range" Then
With Selection
.replace sCOMMA, sTEMPCOMMA, xlPart
.replace sDOT, sTEMPDOT, xlPart
.replace sTEMPCOMMA, sDOT, xlPart
.replace sTEMPDOT, sCOMMA, xlPart
End With
End If
End Sub