+ Reply to Thread
Results 1 to 19 of 19

Excel 2007 : Converting text to number is taking ages

  1. #1
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Converting text to number is taking ages

    Hi,

    I have just converted a range of numbers, that were stored as text, to number. I did this by clicking on the exlamation symbol, shown at the top of the selected range and then clicked "Convert to Number".

    The range contained about 2200 cells and it has taken Excel 2007 almost a half hour to complete this operation. In Excel 2003 this was much faster.

    I also tried multiplying by 1 (Paste special ...) and that only took about 1 second to complete.

    Am I missing some setting which causes Excel 2007 to re-calculate the entire workbook after each conversion to number?

    Any advise is appreciated.

    Erwin

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting text to number is taking ages

    Sounds viable - and if so it would seem as though the cells being adjusted are either precedents of a LOT of formulae (and/or inefficient formulae) OR if not precedents you must have lots of Volatile functions in your model.

  3. #3
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Converting text to number is taking ages

    Hi DonkeyOte,

    There are no functions in the workbook that I know of. Sheet1 contains the range of numbers that I converted. Sheet2 contains only values and some formulas adding/subtracting cells (e.g.: =A1+B1, nothing fancy). The values that I was converting are not precedent to any formula (at least they weren't at the time of conversion).

    There was a filter applied to the Sheet2, but I tried it again without the filter applied, but the result was the same.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting text to number is taking ages

    I just tested converting 2000 numbers stored as text to numbers in XL2007 and it took about a second.

    Do you have any conditional formatting in your file ?

  5. #5
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Converting text to number is taking ages

    Nope,

    I fired up Excel with a blank workbook. Then pasted values from another Excel workbook into Sheet1 and removed some columns that I didn't need. Then I pasted grid output from a SQL query (SSMS 2008) into Sheet2 and added some formulas there. No formatting applied.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting text to number is taking ages

    If on Sheet1 you go to the last dirty cell using CTRL + END does it take you to the expected row ?

  7. #7
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Converting text to number is taking ages

    No, it takes me to the last cell of the original range that I pasted into the worksheet (I deleted columns B-N and P-Q, so I kept column A and the original column O is now column B). CTRL+END takes me to Q2200.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting text to number is taking ages

    It was more the row I was interested in - and that appear to be correct.

    That said - if you purge the now defunct areas and save the file (ie reset used range) and re-run is it any quicker ?

    and yes, I am clutching at straws

  9. #9
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Converting text to number is taking ages

    Sorry, no improvement.

    I restarted Excel and pasted the range into a new blank workbook. This time I saved the file first (this indeed cleans up the deleted areas). However converting to number is still as slow as it was before. CPU usage varying between 50 and 80%, but sometimes topping 90% (Intel dual core 2,4GHz with 4GB RAM).

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting text to number is taking ages

    If the values in the dataset you're using are obscure - ie there is no confidentiality concern - please post the sample file to the board so we can test locally
    (use the paperclip icon in the reply window - if you can't see it click GoAdvanced)

  11. #11
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Converting text to number is taking ages

    Hi DonkeyOte,

    it turns out that saving the file after pasting the values and then restarting Excel solves a lot. The range is now converted in the blink of an eye. So, although the range that I copied from the original Excel file contained only values, is it possible the Excel keeps some reference to the formulas that were in this original file? That one was packed full of formulas (none of which were dependent on the values that were copied).

    It seems like a bug to me.

  12. #12
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting text to number is taking ages

    I've no answer for you I'm afraid either way.

    If you're saying you only pasted in values and the cells pasted in are not precedents of other formulae, range names nor are they used in Conditional Formatting then I'm none the wiser.

    Hopefully someone else will have first hand experience of what you're referring to - I'm afraid I don't.

  13. #13
    Registered User
    Join Date
    09-09-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Converting text to number is taking ages

    Hi DonkeyOte,

    I now know what I must do next time I'm converting a range of values. Or I can use the old "multiply by 1" trick.

    Thanks for taking the time to try and solve this problem with me.

    Regards,
    Erwin

  14. #14
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Converting text to number is taking ages

    FWIW, if you use Paste Special - Add after copying a blank cell, then blank cells will be unaffected, unlike the *1 trick which converts them to 0.
    Remember what the dormouse said
    Feed your head

  15. #15
    Registered User
    Join Date
    08-17-2011
    Location
    Scranton, PA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Converting text to number is taking ages

    I found a solution, if it is still needed. Use text to column. Highlight the column with the numbers stored as text, open text to columns, select delimited, uncheck all the delimiters, make sure the formatting is general, and then click finish. Works like a charm. I don't know why it took me so long to think us this as a solution, but I've been annoyed by your exact problem.

  16. #16
    Registered User
    Join Date
    11-10-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    1

    Smile Re: Excel 2007 : Converting text to number is taking ages

    Registered just to thank Soderburg for an excellent solution to a vexing problem for me too. I had never used data tab then 'text to columns'. That was lightning fast! Thanks for the tip.

  17. #17
    Registered User
    Join Date
    06-26-2015
    Location
    Richmond Hill, Canada
    MS-Off Ver
    2013
    Posts
    1

    Re: Excel 2007 : Converting text to number is taking ages

    Thanks Soderberg!
    Convert text to column works like lightning.
    I also like the option of multiplying all column by 1 (paste special, multiply).

  18. #18
    Registered User
    Join Date
    07-17-2018
    Location
    Raleigh, NC
    MS-Off Ver
    Office 365
    Posts
    1

    Re: Excel 2007 : Converting text to number is taking ages

    I also just registered so that I could thank Soderberg for this solution. It's now 2018, and I'm still having the same issue. But his solution works like a charm. Thanks tons!

  19. #19
    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,926

    Re: Excel 2007 : Converting text to number is taking ages

    Quote Originally Posted by mariange View Post
    I also just registered so that I could thank Soderberg for this solution. It's now 2018, and I'm still having the same issue. But his solution works like a charm. Thanks tons!
    It is always great to get feedback like this, and to hear that many suggestions, made years ago, are still valid and still helping people - thank you!!
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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