GerrardSVK
New Member
- Joined
- Sep 18, 2023
- Messages
- 29
- Office Version
- 2016
- Platform
- Windows
Hi everyone could someone help me I just need to write simple macro that will change number from this format: 1.234 into format using comma instead of dot : 1,234
Also I need to change sign of degrees into nothing. So if there will be some number like this 1.234° final result will be 1,234.
I tried this but dont work:
Sub Replace()
Workbooks(2).ActiveSheet.Range("G9:G136").Replace What:=".", Replacement:=","
Workbooks(2).ActiveSheet.Range("G9:G136").Replace What:="°", Replacement:=""
End Sub
I think there have to be additional xlPart defined or something.
Also I need to change sign of degrees into nothing. So if there will be some number like this 1.234° final result will be 1,234.
I tried this but dont work:
Sub Replace()
Workbooks(2).ActiveSheet.Range("G9:G136").Replace What:=".", Replacement:=","
Workbooks(2).ActiveSheet.Range("G9:G136").Replace What:="°", Replacement:=""
End Sub
I think there have to be additional xlPart defined or something.