+ Reply to Thread
Results 1 to 17 of 17

Formula to place a decimal

  1. #1
    Registered User
    Join Date
    07-10-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    6

    Question Formula to place a decimal

    I'm using Office 2010.
    I have numerous columns of data over 5000 rows that I need to place a decimal 2 places in from the left in (I.E. 41555555 => 41.555555). What formula would I use to do this?
    Another example:
    Current- What I need it to look like-
    41555555 41.555555
    42111111 42.111111
    42999999 42.999999

    Any help would be greatly appreciated!!
    Thanks!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to place a decimal

    Are ALL the numbers the same length (8 digits) ?

    If so, try

    =A1/1000000

  3. #3
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Formula to place a decimal

    =text(a1,"##.#####,,")

  4. #4
    Registered User
    Join Date
    07-10-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to place a decimal

    Yes, in each of the columns the legth of numbers is the same, but different through the other columns (Column A is 8 digits where Column B is 9 digits).
    I'm feeling kind of stupid here, hahaha.....but
    I've tried both of these and am getting a "circular reference" error. I've tried setting formula in a different column, a different cell, clicking the entire column with the same error. I've also gotten the "#VALUE!" error. Not sure why this is happening

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to place a decimal

    Post a sample book.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Formula to place a decimal

    Quote Originally Posted by mhamilton703 View Post
    I'm using Office 2010.
    I have numerous columns of data over 5000 rows that I need to place a decimal 2 places in from the left in (I.E. 41555555 => 41.555555). What formula would I use to do this?
    Quote Originally Posted by mhamilton703 View Post
    Yes, in each of the columns the legth of numbers is the same, but different through the other columns (Column A is 8 digits where Column B is 9 digits).
    If your data is in A1:A5000, then in an unused column starting in the same row (e.g. X1), enter the following formula and copy down the column:

    =IF(A1="","",SIGN(A1)*TEXT(A1,"00\." & REPT("0",LEN(A1)-2)))

    If you want to replace A1:A5000 with those values, copy X1:X5000 and paste-special-value into A1:A5000. Ignore what you see in X1:X5000 subsequently. Simply delete the formulas in X1:X5000.

    That assumes that the numbers in A1:A5000 never have more than 15 digits.

    Repeat the procedure for each column, replace A1:A5000 with the next range.

    If this is too tedious to do manually for "numerous" columns, would want to use a VBA macro?

    PS: The IF(A1="","",...) part of the formula avoids mistakes where you apply the "conversion" to blank cells in column A. But it would be better to ensure that you only have as many formulas in column X as you have numbers in column A. The IF(A1="","",...) part can be left as-is; it would become ineffective. The problem I am trying to avoid is: if you have more conversion formulas than you have numbers, some of the results in column X would be the null string (""), as intended. But when you copy-and-paste-special to overwrite column A, the cells in column A that were empty initially and still appear to be empty would now actually contain the invisible null string. That can affect other formulas. For example, COUNTA(A1:A5000) might return an expected result.
    Last edited by joeu2004; 07-10-2014 at 03:23 PM. Reason: Handling signed numbers

  7. #7
    Registered User
    Join Date
    07-10-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to place a decimal

    So here is a screenshot of the before in Columns H and I:
    ExcelSSBefore.jpg

    And this is what I want it to look like after:
    ExcelSSAfter.jpg

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to place a decimal

    Pictures aren't really helpfull.
    We can't copy/paste the values into our own sheets to work with them.
    I'm certainly not going to type them in by hand..

    Can you post an actual excel workbook?

  9. #9
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Formula to place a decimal

    Insert a column inbetween Column H and Column I, so that your new Column I is now blank. In cell I3 (which should be the blank cell next to 41853889) enter this equation: =TEXT(H3,"###.#########,,"). You can then copy the formula all the way down. Repeat for the second column of data, just change the cell reference (H3) to the cell you want to convert.

  10. #10
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Formula to place a decimal

    Quote Originally Posted by mhamilton703 View Post
    So here is a screenshot of the before in Columns H and I:
    Attachment 331325

    And this is what I want it to look like after:
    Attachment 331328
    Not all the numbers in the latter ("what I want") have the "decimal 2 places in from the left", as you required initially. Is it really the case that all the numbers should have 6 decimal places?

    If that is the case, enter 1000000 into an unused cell (e.g. X1), copy it, select the range of numbers to convert (e.g. A1:A5000), right-click and click on Paste Special, select Divide, then click on OK. Then format the range as Number with 6 decimal places.

  11. #11
    Registered User
    Join Date
    07-10-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to place a decimal

    Sorry about that...got several things going on and didn't think about that....
    Here is an edited version of what I'm working on!
    Attached Files Attached Files

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to place a decimal

    OK, it 'looks like' you don't actually want the . after the 2nd number (you have it after the 3rd in some

    Would it be more accurate to say you want the . BEFORE the last 6 numbers?
    At least according to the pictures and xl file it appears that way

  13. #13
    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
    52,936

    Re: Formula to place a decimal

    It looks like you already have what you want in column H?

    Which other columns do you nered to "fix"? Also, can I ask why you need to do this in the 1st place?

    edit: OK I see that only a few are done

    Try this...
    put 1000000 in a cell on its own
    with the cursor still on that cell, press CRTL C (copy)
    Now, highlight the range you need to apply this to
    Click the Paste dropdown arrow and select paste Special
    check Divide
    click OK
    Last edited by FDibbins; 07-10-2014 at 03:51 PM.
    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

  14. #14
    Registered User
    Join Date
    07-10-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to place a decimal

    Yes it would be safe to say that I need the "." before the last 6 numbers. I did the first 18 lines manually of both H and I manually, still have over 3900 lines to do.
    I work for a Cell Phone Company and I need this to set some parameters within software that we use to test and report our sites.

  15. #15
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to place a decimal

    See the 'adjusted' values in columns J and K

    I used =REPLACE(H3,LEN(H3)-5,0,".")

    EFmhamilton.xlsx

  16. #16
    Registered User
    Join Date
    07-10-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to place a decimal

    That's awesome! Will definitely file that formula away for future reference!!
    Thank you everyone for all of your help and patience! It is very much appreciated! Hope everyone has a great day!

  17. #17
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to place a decimal

    You're welcome.

+ 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] Need help with decimal place output using IMPRODUCT formula.
    By sergiob in forum Excel General
    Replies: 10
    Last Post: 06-27-2012, 08:12 PM
  2. decimal place formula
    By superspurs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-27-2009, 07:58 AM
  3. Numbers round down when a 5 is in the third decimal place using a formula
    By Jbagger in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-27-2007, 11:59 AM
  4. setting number to one decimal place with formula
    By caliskier in forum Excel General
    Replies: 1
    Last Post: 01-17-2007, 06:54 PM
  5. Replies: 3
    Last Post: 03-18-2006, 02:25 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