+ Reply to Thread
Results 1 to 7 of 7

Cannot format cells II

  1. #1
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    Cannot format cells II

    Tho' I have a similar problem to the post "Cannot format cells", the solution there does not work for me.

    I've copied a set of cells across from a stats program. All the data cells are formatable, but not the reference numbers in the first column. I need to be able to re-format these to do a Data Sort. When I do attempt a data sort, it treats this column of data as non-numerical; and the option to sort as if it were numerical only partially sorts numerically.

    I'm also not sure how to attach an example to this; I hope I've done it correctly.

    Cannot Format Cells.xlsx

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Cannot format cells II

    Try using the INT function to convert the strings in column A to text and then sorting.
    Martin

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

    Re: Cannot format cells II

    I understand it that you want to sort the data in numeric order by the numbers in column A which are "text" numbers.

    Enter a 1 in a blank cell and copy it.

    Select column A then click on Paste Special, multiply. This will multiply all the values selected in column A by the 1 that you copied. This will change the text numbers to real numbers.

    Select the data and sort using column A as the sort key.
    <---------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

  4. #4
    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,956

    Re: Cannot format cells II

    Another option....
    if you look at A3, you will see a small yellow diamond next to it. Highlight all the data in A, scroll back up to A3 (if necessary), click the diamond and select "convert to number"
    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

  5. #5
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    Re: Cannot format cells II

    Quote Originally Posted by mrice View Post
    Try using the INT function to convert the strings in column A to text and then sorting.
    Thanks for responding Martin. However, I don't really understand. INT converts decimalised numbers to integers, which isn't the problem here. Plus I'd have to do this to each entry - which compounds the problem. But thanks for the attempt to help.

  6. #6
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    Re: Cannot format cells II

    That works! Great. Thanks

  7. #7
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    Re: Cannot format cells II

    That works too! Great. Thanks guys for all your help. I can move on now.

  8. #8
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Cannot format cells II

    The INT function will also convert a text string to an integer. By applying the function in the first row and dragging down, you can convert all the cells. Then you can sort by the column containing the function.

+ 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. Format cells in one sheet then vlookup and paste format into another
    By xyz999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2013, 06:28 AM
  2. format cells-need to format cells to nearest million
    By maxsink in forum Excel General
    Replies: 1
    Last Post: 10-26-2008, 12:32 PM
  3. [SOLVED] how do i format a cell based on format of a range of cells?
    By Chris Hardick in forum Excel General
    Replies: 2
    Last Post: 04-03-2006, 03:55 AM
  4. [SOLVED] want format cells alignment not format cells font style
    By Jeannie Bean in forum Excel General
    Replies: 2
    Last Post: 02-10-2006, 05:35 AM
  5. [SOLVED] Cells won't convert to number format, even after format/cells/num.
    By scottr in forum Excel General
    Replies: 5
    Last Post: 04-12-2005, 06: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