Replace third character from right with other character

Tommeck37

New Member
Joined
Nov 12, 2014
Messages
49
Hello,

Can anyone help with this task

I have figures in strange format : 1.500.250,20 which should be 1,500,250.20.
Do you know the way to replace points with commas and commas with dots?

Ctrl+H replaces all at one go so you either have all points or all commas. But the thing is to have the third character from right replaced with point.

I am lost. Can you shed the light?

Cheers

Tommeck37
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Just adding for another option, build a new string from substrings putting the separators in between.
 
Upvote 0
Hello,

Thank you guys for your help.

SUBSTITUTE formula works fine but only for this specific example. However, I need to apply the change to various figures which has fewer or more digits than that in example.

That's why petereddy's way suits well for my problem. I change first points into letter and then comma into point and letter into comma.

Thank you very much !
 
Upvote 0
If your values will always have two decimal places after the conversion, then you can use this formula...

=TEXT(SUBSTITUTE(SUBSTITUTE(A1,".",""),",","."),"#,##0.00")
 
Upvote 0
If your values will always have two decimal places after the conversion, then you can use this formula...

=TEXT(SUBSTITUTE(SUBSTITUTE(A1,".",""),",","."),"#,##0.00")
And if the number of digits after the decimal point in the converted value can vary, then use this formula instead...

=TEXT(SUBSTITUTE(SUBSTITUTE(A1,".",""),",","."),"#,##0"&IF(COUNTIF(A1,"*,*"),"."&REPT(0,LEN(A1)-FIND(",",A1&",")),""))
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,542
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top