+ Reply to Thread
Results 1 to 3 of 3

how to change format of specific text or number

  1. #1
    Forum Contributor
    Join Date
    02-12-2014
    Location
    al ain
    MS-Off Ver
    Excel 2016
    Posts
    149

    Unhappy how to change format of specific text or number

    easy way to change text in cell A1 055-9578005 to (055)957-8005 and vise versa..


    Thanks!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: how to change format of specific text or number

    If that really is what your cell contents look like, then they are text entries, not numeric, so that kind of formatting will have no affect on them. You will need to convert them back to numbers 1st
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,741

    Re: how to change format of specific text or number

    Does this do what you are wanting? FYI: The apparent line feeds are what the code does to the below grid. The actual data is all one line in each cell.

    Row\Col
    A
    B
    C
    1
    055-9578005 (055)957-8005 In B1 :=TEXT(--LEFT(SUBSTITUTE($A1,"-",REPT(" ",99)),99),"(000)")&TEXT(--RIGHT(SUBSTITUTE($A1,"-",REPT(" ",99)),99),"000-0000")
    2
    (055)957-8005 055-9578005 In B2 :=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($A2,"-",""),")","-"),"(","")
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] In a specific column find text and change the format
    By Louisa Venter in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-22-2015, 02:43 PM
  2. [SOLVED] Finding specific text and change the format
    By Louisa Venter in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2015, 05:11 PM
  3. [SOLVED] [SOLVED] Change number format from text to number?
    By Scot in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-01-2005, 12:20 PM
  4. [SOLVED] Change number (in text format) to numeric format
    By Pam in forum Excel General
    Replies: 5
    Last Post: 10-24-2005, 03:05 PM
  5. Hoe to change text format .126 to number format 0.126
    By vitality in forum Excel General
    Replies: 2
    Last Post: 10-06-2005, 08:05 AM
  6. How to change text format .126 to number format 0.126 ?
    By vitality in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-06-2005, 08:05 AM
  7. [SOLVED] Format Number to Text:How can I change the format in sheet1
    By Roni in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2005, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1