#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Help on conversion

Hi

In Column-A there is a list of numbers with hyphen i.e.:
95818-125199

How can this list of numbers covert into following format in Column-B?
95818-1251-99

In other words of explanation is that I want to keep this format
95818-125199 in Column-A, but to change the format into 95818-1251-99 in
Column-B. Please help me with Formula or Macro so each time when I enter
95818-125199 in Column-A it can convert automatically in the format of
95818-1251-99 in Column-B. I thank you in advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 349
Default Help on conversion

In cell B1 try something like...

=LEFT(A1,LEN(A1)-2) & "-" & RIGHT(A1,2)

copy it down the column as you need, if you don't want to see #VALUE errors
for rows with no value in column A, simply add a condition check for the cell
in the A column, perhaps like this...

=IF(A1<0,LEFT(A1,LEN(A1)-2) & "-" & RIGHT(A1,2),0)


--
Regards - Peter


"Help on formula" wrote:

Hi

In Column-A there is a list of numbers with hyphen i.e.:
95818-125199

How can this list of numbers covert into following format in Column-B?
95818-1251-99

In other words of explanation is that I want to keep this format
95818-125199 in Column-A, but to change the format into 95818-1251-99 in
Column-B. Please help me with Formula or Macro so each time when I enter
95818-125199 in Column-A it can convert automatically in the format of
95818-1251-99 in Column-B. I thank you in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Help on conversion

Assuming all your numbers are 13 characters long, try this formula...

=LEFT(A1,10)&"-"&RIGHT(A1,2)

If you will have empty cells in column A, the use this version...

=IF(A1="","",LEFT(A1,10)&"-"&RIGHT(A1,2))

--
Rick (MVP - Excel)


"Help on formula" wrote in message
...
Hi

In Column-A there is a list of numbers with hyphen i.e.:
95818-125199

How can this list of numbers covert into following format in Column-B?
95818-1251-99

In other words of explanation is that I want to keep this format
95818-125199 in Column-A, but to change the format into 95818-1251-99 in
Column-B. Please help me with Formula or Macro so each time when I enter
95818-125199 in Column-A it can convert automatically in the format of
95818-1251-99 in Column-B. I thank you in advance.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Help on conversion

Thank you very much from the deepest of my hart!
Mr. Peter and Mr. Rothstein your formula feed-back works great; Thank again


"Help on formula" wrote:

Hi

In Column-A there is a list of numbers with hyphen i.e.:
95818-125199

How can this list of numbers covert into following format in Column-B?
95818-1251-99

In other words of explanation is that I want to keep this format
95818-125199 in Column-A, but to change the format into 95818-1251-99 in
Column-B. Please help me with Formula or Macro so each time when I enter
95818-125199 in Column-A it can convert automatically in the format of
95818-1251-99 in Column-B. I thank you in advance.

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
Conversion help Iriemon Excel Worksheet Functions 1 April 1st 09 03:57 PM
conversion djl Excel Discussion (Misc queries) 1 February 1st 09 09:19 AM
Day Conversion Michael Excel Worksheet Functions 3 September 10th 07 11:40 PM
ESN conversion jay-rod Excel Worksheet Functions 2 April 29th 07 11:36 PM
Conversion Duke Energy Excel Discussion (Misc queries) 0 January 24th 06 09:30 PM


All times are GMT +1. The time now is 04:43 PM.

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

About Us

"It's about Microsoft Excel"