+ Reply to Thread
Results 1 to 6 of 6

Format text issue

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    Format text issue

    Hello everyone. The Thank you in advance for you help.

    The attached workbook contains my seemingly simple problem.

    I have data that needs to be formatted in a certain way in order to upload it into a finacial system. It needs to be in text (column B). The problem I'm running into is that I can't seem to format it or get a formula that will work that will return the values in Column B. The only way I can get that is to type it in manually. With thousands of lines per entry this is not an option.

    Does anyone know a formula or format trick that I could use? This seems so simple but I can't find the answer.

    Thanks

    Eddie
    Attached Files Attached Files
    Last edited by punter; 12-17-2010 at 01:35 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Format text issue

    Hello Eddie,

    I don't think we have enough information. How do you get from 5317 to 05317? i.e. What are the rules we must ask Excel to use. e.g.
    Do we always add a leading zero?
    What if the number is less than 4 digits, e.g. 317. Do we add two zeros to get 00317?
    What about more than 4 digits? Do we still add a zero?

    Give us the rules and we'll no doubt come up with an answer.

    Rgds

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    Re: Format text issue

    Forgive me. I should have laid it out.

    It is in two parts:


    1-The number values (as on the attached sheet) will always be five digits. It is store 2 I need four zeros added. If it is store 5317 I will need one zero added. They will all have to be five digits and in the format of column B.

    2-There will be non numberic values but I guess they would be easier. Example: I would need New York in the same format (no zeros of course) of column B on the attached sheet. The system needs to pull everything in the same way.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Format text issue

    Are these calculated values? If so
    =TEXT(your formula,"00000")

    If not, in another cell
    =TEXT(A2,"00000") dragged down.
    Is that what you are looking for? If you are exported the data though, you'll probably need to copy>paste special>values over top of the formula to finalize it. They will stay text.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    Re: Format text issue

    Thank you so much!!!!!

    That works wonderful for the numeric values.

    What would I do if I wanted to get the same format for a non numeric value (without the zeros of course)?

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Format text issue

    Not sure what you are asking..... If it's non-numeric, then above formulas will just keep it the same (i.e. if "New York" is in A2.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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