ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Delete a period in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/148374-delete-period-cell.html)

Dar Dar

Delete a period in a cell
 
I have below data in the excel from an import.

001-8420-849900

I want to change into 0018420.849900.

I know how to replace "-" with "." but not sure how to delete one of "."

Thanks!



dlw

Delete a period in a cell
 
if it's always the same number of digits between the dashes, you can use the
=LEFT and =RIGHT functions to split it up and =CONCATENATE it back together
without the dashes then use the find/replace

"Dar Dar" wrote:

I have below data in the excel from an import.

001-8420-849900

I want to change into 0018420.849900.

I know how to replace "-" with "." but not sure how to delete one of "."

Thanks!



Peo Sjoblom

Delete a period in a cell
 
You can use a help column with formulas, assume the import starts in A2, in
B2 put (if B2 is taken select column B and do insertcolumn)

=SUBSTITUTE(SUBSTITUTE(A2,"-",".",2),"-","")

copy down as long as needed and the copy and paste special as values over
the old values


finally delete the help column

of course this assumes that there are 2 dashes/hyphens to replace and that
you want to remove the first and replace the second with a period


--
Regards,

Peo Sjoblom


"Dar Dar" <Dar wrote in message
...
I have below data in the excel from an import.

001-8420-849900

I want to change into 0018420.849900.

I know how to replace "-" with "." but not sure how to delete one of "."

Thanks!





Dar Dar[_2_]

Delete a period in a cell
 
Hi Peo,

Thanks so much. It works like magic. :)

By any chance, do you know if there is a way to set up in Excel to
automatically change to that format all time?

Thanks again. Have a great day.

Dar Dar

"Peo Sjoblom" wrote:

You can use a help column with formulas, assume the import starts in A2, in
B2 put (if B2 is taken select column B and do insertcolumn)

=SUBSTITUTE(SUBSTITUTE(A2,"-",".",2),"-","")

copy down as long as needed and the copy and paste special as values over
the old values


finally delete the help column

of course this assumes that there are 2 dashes/hyphens to replace and that
you want to remove the first and replace the second with a period


--
Regards,

Peo Sjoblom


"Dar Dar" <Dar wrote in message
...
I have below data in the excel from an import.

001-8420-849900

I want to change into 0018420.849900.

I know how to replace "-" with "." but not sure how to delete one of "."

Thanks!






Teethless mama

Delete a period in a cell
 
Another way...

=REPLACE(REPLACE(A2,FIND("-",A2,FIND("-",A2)+1),1,"."),FIND("-",A2),1,"")


"Dar Dar" wrote:

I have below data in the excel from an import.

001-8420-849900

I want to change into 0018420.849900.

I know how to replace "-" with "." but not sure how to delete one of "."

Thanks!




All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com