Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PSL PSL is offline
external usenet poster
 
Posts: 8
Default how to format cells having text and numeric

Hi,
Please help me formating cells.

Example:

DM17043X10 - this is the text having in a cell

I need to format the above text as:

DM-1704- -3X10

spaces given between 4- & -3
Please help me on this.

Thank You,
PSL.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default how to format cells having text and numeric

Hi PSL,

You can't do this through formatting but, provided your data always have the
same format, you can use a formula like the one below to reformat the
strings:
=LEFT(A1,2)&"-"&MID(A1,3,4)&"- -"&RIGHT(A1,4)

--
macropod
[MVP - Microsoft Word]


"PSL" wrote in message
...
Hi,
Please help me formating cells.

Example:

DM17043X10 - this is the text having in a cell

I need to format the above text as:

DM-1704- -3X10

spaces given between 4- & -3
Please help me on this.

Thank You,
PSL.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default how to format cells having text and numeric

You can't do this with a number format.

But you could use a helper cell and a formula:
=left(a1,2) & "-" & mid(a1,3,4) & "- -" & right(a1,4)

This may work ok if all the data is really 10 characters wide.

PSL wrote:

Hi,
Please help me formating cells.

Example:

DM17043X10 - this is the text having in a cell

I need to format the above text as:

DM-1704- -3X10

spaces given between 4- & -3
Please help me on this.

Thank You,
PSL.


--

Dave Peterson
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
Changing cell format - for example text to numeric sjrku Excel Discussion (Misc queries) 3 December 30th 05 10:40 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Combining data (numeric format) in multiple cells into one cell (t GNAC SID Excel Discussion (Misc queries) 2 February 7th 05 04:09 PM
Text to Numeric format Joe Excel Discussion (Misc queries) 1 December 9th 04 04:52 PM


All times are GMT +1. The time now is 03:04 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"