+ Reply to Thread
Results 1 to 14 of 14

Problems converting text to general/number cells in excel 2013

  1. #1
    Registered User
    Join Date
    05-10-2015
    Location
    frankfurt
    MS-Off Ver
    Office 2013 on windows pro 8.1
    Posts
    10

    Problems converting text to general/number cells in excel 2013

    Hi!, iīm using Excel 2013 on win 8.1, I pasted a table from a website into Excel, the numbers in it are formated in text since they are allingned to the left and no formula like sum work on them, I tried every posible method available to convert those cells into numbers, They donīt have any exclamation mark next to them so that I canīt chose to convert directly, I tried the special paste method by creating and copying a "1" cell, and then multiplying all cells to that number and nothing happens, the numbers keep being shown to the left and no formula work, I tried converting the cells into an Excel table but it doesnīt work, nothing happens. Some cells have a letter next to its number like 5p which I thought could be the cause but if I try selecting only the cells with numbers without letters nothing Works either. I donīt know what to do now, this should be a very easy thing to do but I hope not to have to enter all numbers manually in new cells, if anyone knows how to convert these apparently text cells to general or number cells please give me a clue, thanx!!

  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,049

    Re: Problems converting text to general/number cells in excel 2013

    Hi, welcome to the forum
    Check to see if there are leading/trailing spaces in the cells?
    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 Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Problems converting text to general/number cells in excel 2013

    Copying and pasting from the web is notorious for getting html "junk" included with the data.

    The most common "junk" is a whitespace character called a non-breaking space. It's also known as char 160 nbsp.

    The macro at this website will remove all leading/trailing
    and multiple interspersed char 32 space characters.
    It will also remove and/or convert char 160 non breaking
    spaces into standard char 32 space characters. It will
    work on text or numbers and the numbers will be
    converted to true numeric numbers.

    I use this macro dozens of times every single day!
    It's a real time saver.

    http://www.mvps.org/dmcritchie/excel/join.htm#trimall
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    05-10-2015
    Location
    frankfurt
    MS-Off Ver
    Office 2013 on windows pro 8.1
    Posts
    10

    Re: Problems converting text to general/number cells in excel 2013

    Hi!

    In fact, I discovered there are spaces next to each number and once i delet that space they allignt to the right and formulas work, but should I do this with every cell?, is there a method to eliminate those spaces in one step for all cells?

  5. #5
    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,049

    Re: Problems converting text to general/number cells in excel 2013

    Try using a helper column with =TRIM(a2) where A2 is the cell with the data in it

    If that doesnt work, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Problems converting text to general/number cells in excel 2013

    Quote Originally Posted by jofree View Post
    is there a method to eliminate those spaces in one step for all cells?
    Yes.

    See post #3.

  7. #7
    Registered User
    Join Date
    05-10-2015
    Location
    frankfurt
    MS-Off Ver
    Office 2013 on windows pro 8.1
    Posts
    10

    Re: Problems converting text to general/number cells in excel 2013

    Thanks all!!, I used the macro and it partially solved my problem, while after applying the macro I was finally able to use the "special paste" method to convert all to numbers, some cells which also contain letters like: "5p" are still not recognized as numbers, the "p" only mean theyīre provisinal numbers, is there a way to only use the numbers from those cells without removing the letter??

  8. #8
    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,049

    Re: Problems converting text to general/number cells in excel 2013

    Perhaps you missed this comment in post # 5?

    If that doesnt work, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    That way, we wont be guessing

  9. #9
    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,049

    Re: Problems converting text to general/number cells in excel 2013

    Perhaps you missed this comment in post # 5?

    If that doesnt work, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    That way, we wont be guessing

  10. #10
    Registered User
    Join Date
    05-10-2015
    Location
    frankfurt
    MS-Off Ver
    Office 2013 on windows pro 8.1
    Posts
    10

    Re: Problems converting text to general/number cells in excel 2013

    tablefrominternet.xlsm

    Here it is, as you see itīs a simple table copied from internet, i run the "trimall" macro on it, but the cells with numbers and letters wonīt perform as numbers. My expected result: I just want to be able to use formulas on the cells which contain numbers and letters too, while keeping the letters in them, is this posible or is it mandatory to trim all letters from the cells to do that?

  11. #11
    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,049

    Re: Problems converting text to general/number cells in excel 2013

    Not sure which way you need to add the numbers, I assumed by row, try this...
    =SUMPRODUCT(--(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A3:L3,"p",""),",","."),":",0),"e","")))
    copied down

  12. #12
    Registered User
    Join Date
    05-10-2015
    Location
    frankfurt
    MS-Off Ver
    Office 2013 on windows pro 8.1
    Posts
    10

    Re: Problems converting text to general/number cells in excel 2013

    I replaced the commas in the formula with semicolons and changed the cells references with the ones i wanted and it worked very nice, the content of the cells still allign to the left though, thanks a lot!!

  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
    53,049

    Re: Problems converting text to general/number cells in excel 2013

    Im happy it worked for you

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

  14. #14
    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,049

    Re: Problems converting text to general/number cells in excel 2013

    Im happy it worked for you

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. converting general cells format to text
    By junkgrrl in forum Excel General
    Replies: 3
    Last Post: 10-17-2012, 04:52 AM
  2. Converting time cell into general number
    By aliwatz in forum Excel General
    Replies: 3
    Last Post: 03-04-2009, 04:48 PM
  3. Converting general number to decimal number
    By dkl in forum Excel General
    Replies: 7
    Last Post: 05-02-2008, 09:26 PM
  4. [SOLVED] Converting 'General' formatted cells to Text formatted cell using.
    By Zahid Khan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2005, 04:06 PM

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