#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default TEXT

I have large number of coding data like this (K4115KBA02WB005) these are 15
digits, what i want is to enter - sign after 10 digit (like K4115KBA02-WB005).
please tell me some short way.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200707/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default TEXT

On Jul 10, 9:12 am, "adeel via OfficeKB.com" <u32736@uwe wrote:
I have large number of coding data like this (K4115KBA02WB005) these are 15
digits, what i want is to enter - sign after 10 digit (like K4115KBA02-WB005).
please tell me some short way.

--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/ms-excel/200707/1


left(a1,10)&"-"&right(a1,5) should be close. just substitute your cell
for a1.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default TEXT

Use a helper column. If your data is in column A (beginning at A1), then in
another column (Z1 for example) enter the following formula and copy down as
needed.

HTH,
Paul

"adeel via OfficeKB.com" <u32736@uwe wrote in message
news:74f6e21805dec@uwe...
I have large number of coding data like this (K4115KBA02WB005) these are 15
digits, what i want is to enter - sign after 10 digit (like
K4115KBA02-WB005).
please tell me some short way.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200707/1



  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default TEXT

If the number of characters should not always be 15, then this code might
work to add the hyphen after the 10th character if one exists.

Sub addHyphen()
'Select Range manually, then run macro to add hyphen after
'the 10th character if it exists.
Dim cell As Range
For Each cell In Selection
If Len(cell.Value) 10 Then
cell.Value = Left(cell.Value, 10) & "-" & Mid(cell.Value, 11, 99)
Else: cell.Value = "'" & cell.Value
End If
Next cell
End Sub

Vaya con Dios,
Chuck, CABGx3



"adeel via OfficeKB.com" wrote:

I have large number of coding data like this (K4115KBA02WB005) these are 15
digits, what i want is to enter - sign after 10 digit (like K4115KBA02-WB005).
please tell me some short way.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200707/1


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default TEXT

It might have helped if I included the formula.

=LEFT(A1,20)&"-" & RIGHT(A1,LEN(A1)-10)

Regards,
Paul

"PCLIVE" wrote in message
...
Use a helper column. If your data is in column A (beginning at A1), then
in another column (Z1 for example) enter the following formula and copy
down as needed.

HTH,
Paul

"adeel via OfficeKB.com" <u32736@uwe wrote in message
news:74f6e21805dec@uwe...
I have large number of coding data like this (K4115KBA02WB005) these are
15
digits, what i want is to enter - sign after 10 digit (like
K4115KBA02-WB005).
please tell me some short way.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200707/1





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
Text does not display in "Text boxs" and when wrapping text in a c Esteban Excel Discussion (Misc queries) 1 March 8th 07 11:59 PM
Text not continuing to wrap for large block of text in Excel cell Mandra Charts and Charting in Excel 1 May 15th 06 07:13 PM
merged cells into one text cell, size varies dependant on text dat Jazzylady825 Excel Discussion (Misc queries) 0 December 9th 05 08:26 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM


All times are GMT +1. The time now is 08:32 AM.

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"