how to format cells having text and numeric

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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)
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top