Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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!


  #2   Report Post  
Posted to microsoft.public.excel.misc
dlw dlw is offline
external usenet poster
 
Posts: 510
Default 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!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default 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!




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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!





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default 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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete cell values withour deleting cell formulae perfection Excel Discussion (Misc queries) 5 June 18th 07 09:05 PM
How to delete cell values without affecting cell formulae perfection Excel Discussion (Misc queries) 0 June 18th 07 06:55 AM
Delete cell on 1 page: automatically delete on another page? mountain view Excel Worksheet Functions 0 September 28th 06 04:18 PM
Delete cell contents with input to adjacent cell Ashley Frank Excel Discussion (Misc queries) 1 October 5th 05 04:28 PM
Period to Period percentage change? cs120 Excel Discussion (Misc queries) 1 September 18th 05 12:05 PM


All times are GMT +1. The time now is 12:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"