Forum Discussion
Davis_CS
Sep 17, 2026Occasional Reader
Remove a comma from a number treated as text
Greetings!
I'm new to this forum, and I don't know if this is the right place to ask. But, here it goes: I have a column of currency values which is a mess. I managed to clean it as much as possible using the functions SUBSTITUTE and TRIM. These functions transformed the unformated numbers into text, and now it looks something like this:
| 6,764,68 |
| 1,319 |
| 1,948 |
| 301,40 |
| 2848,08 |
The former is a sample from 165 entries. Is it possible to remove the first comma of the string, so the values look like this instead?
| 6764,68 |
| 1319,00 |
| 1948,00 |
| 301,40 |
| 2848,08 |
What I would like to do is to remove the second comma from right to left in each value, while keeping the first which marks the cents of the transaction. Can this be done?
Thanks all in advance :D
1 Reply
- TerioBrass Contributor
Try
=LET(n,TEXT(A1:A5,"#,00"),d,REGEXEXTRACTI(n,",\d{2}$"),BYROW(n&"§"&d,LAMBDA(r,SUBSTITUTE(SUBSTITUTE(TEXTBEFORE(r,"§"),TEXTAFTER(r,"§"),""),",","")&TEXTAFTER(r,"§"))))
Bye