+ Reply to Thread
Results 1 to 6 of 6

Format 7 digit number into a price (e.g. 0001187 --> 1.19)

  1. #1
    Registered User
    Join Date
    02-26-2016
    Location
    Edmonton, AB
    MS-Off Ver
    2013
    Posts
    4

    Format 7 digit number into a price (e.g. 0001187 --> 1.19)

    I have a long column of numbers that are listed as 7 digits. All start with 0's but some have two 0's, some have three, etc.

    How can I set the formatting so that they all become a price based off the first number following the 0's?

    So I have 0002865 and I want that to change to $2.87 (2.865 rounded to two decimal places, basically).

    I do not want it to change 0002865 to be $2865.00 (which is what it's doing now when I try).

    Thanks

  2. #2
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Format 7 digit number into a price (e.g. 0001187 --> 1.19)

    Hello,

    I think you need to use this:

    Please Login or Register  to view this content.
    This formula turned my test number, 0002685 into $2.69
    IF("helping me", "thanks", "need more detail?")

  3. #3
    Registered User
    Join Date
    02-26-2016
    Location
    Edmonton, AB
    MS-Off Ver
    2013
    Posts
    4

    Re: Format 7 digit number into a price (e.g. 0001187 --> 1.19)

    Thanks. Where do i put that formula? I'm trying to use the "Format Cells" one where it's things like 0.00 or #.###, etc. but that formula doesn't work in there?

    Also, will that work the same for numbers with only two leading 0's? I.e. 0027029 would be $2.70?

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Format 7 digit number into a price (e.g. 0001187 --> 1.19)

    You could enter a 1 somewhere on the worksheet and copy it. Select the values go to Paste Special and in the Operation, select Multiply and click OK. Then in B1 enter this formula and format as currency. This will get rid of all leading zeros and return as real numbers the values that the text numbers represented.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A
    B
    1
    2865
    $2.87
    2
    3945
    $3.95
    3
    1234
    $1.23
    4
    5678
    $5.68


    If the text values are being recognized as Numbers Stored as Text then simply use the above formula in column B, and format as currency.

    A
    B
    1
    0002865
    $2.87
    2
    0003945
    $3.95
    3
    0001234
    $1.23
    4
    0005678
    $5.68
    Last edited by newdoverman; 05-27-2016 at 03:37 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Format 7 digit number into a price (e.g. 0001187 --> 1.19)

    My original formula was meant to be pasted in a cell on the worksheet.

    This new one:

    Please Login or Register  to view this content.
    deals with 5 digit (two leading zero) numbers and 4 digit (3 leading zero) numbers. Just paste it in the cell where you want the dollar value.

    Doverman's solution is equally valid, though you could achieve the same thing by using the formula "=value(a1)"

  6. #6
    Registered User
    Join Date
    02-26-2016
    Location
    Edmonton, AB
    MS-Off Ver
    2013
    Posts
    4

    Re: Format 7 digit number into a price (e.g. 0001187 --> 1.19)

    Thank you, that worked!

+ 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. Convert 3 digit or 4 digit number to time format
    By dubcap01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2015, 04:30 AM
  2. Format 6 digit number as YYYYMM
    By bamroll in forum Excel General
    Replies: 5
    Last Post: 05-14-2014, 10:39 AM
  3. [SOLVED] Converting a 4 digit number into Time Format
    By Solidstan in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-16-2014, 09:27 AM
  4. Five-digit Number Format Codes
    By Funboy in forum Excel General
    Replies: 6
    Last Post: 08-09-2007, 10:18 AM
  5. [SOLVED] How do i format a 5 to 6 digit number into the correct date?
    By Arvi Laanemets in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 04:05 AM
  6. [SOLVED] How do i format a 5 to 6 digit number into the correct date?
    By date cell configuration in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] How do i format a 5 to 6 digit number into the correct date?
    By date cell configuration in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-10-2005, 04:05 PM

Tags for this Thread

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