+ Reply to Thread
Results 1 to 6 of 6

Why does sorting a column in descending order change the values in the cells?

  1. #1
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    Posts
    3

    Cool Why does sorting a column in descending order change the values in the cells?

    Hi guys,

    I am trying to do a simple Excel task and finding that when I do it, my data automatically changes. What I'm trying to do is sort my spreadsheet by a specific column, in descending order. (I need the whole spreadsheet to be sorted by this one column.) By when I highlight the column and click "Sort" and then choose "Descending," all the values in that column's cells change. It is bizarre.

    There are no blank cells in the column I wish to sort by, so that's not the issue. One thing that may be to blame is, I converted this column's values to decimal numbers from percentages. (I did that because I couldn't figure out how to sort the percentages, so I thought it would be easier with decimals.)

    Can anyone suggest a solution? I am attaching the spreadsheet. The column I wish to sort by is Column N, which is labeled "Change."

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Why does sorting a column in descending order change the values in the cells?

    Get rid of the blank columns (O, X, Z).

    Their existence is telling excel that the stuff on either side of them are different tables.

    So if you sort/filter the stuff in columns A-M, it won't move anything in columns P-W.

    Since column N is dependent on column W, that's the source of your error.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Why does sorting a column in descending order change the values in the cells?

    Can you give an example of the before and after value as it's not clear what you mean.

    One thing to be aware of if your data range is not contiguous. Column O is empty therefore columns to the right will not automatically be included in the sort.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    Posts
    3

    Re: Why does sorting a column in descending order change the values in the cells?

    Hi Andy, sure thing.

    For example, the value in cell N9 before sorting is 2.458. After I sort (by descending order), that value (which now appears in cell N14) changes to 1.271. So odd.

    Were you able to open the spreadsheet and play with sorting Column N yourself?

    I don't know if this is relevant, but as I said before, Column N was all percentages which I converted to numbers. Not sure if that might be throwing a wrench in the gears.

    Thanks

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Why does sorting a column in descending order change the values in the cells?

    For me the value in N9 becomes n/a. The rest of the column is formula for the row and the values appear sorted largest to smallest.

    I don't see 1.271 in the column N

    Works both as numbers or percents

  6. #6
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    Posts
    3

    Re: Why does sorting a column in descending order change the values in the cells?

    Oh whoops, I didn't see ben_hensel's reply. Well, Ben Hensel, you were right -- I removed the blank columns like you said, re-did my sort, and voila! It worked. I am a happy, happy man, and it's all because of you, sir. I hope you have a great day and a great weekend!

+ 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. Replies: 3
    Last Post: 04-19-2013, 03:07 PM
  2. Replies: 3
    Last Post: 01-05-2013, 11:06 AM
  3. Sorting in descending order and show duplicate values
    By cceze in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-19-2012, 09:33 AM
  4. Replies: 14
    Last Post: 04-17-2012, 05:18 PM
  5. sorting error:in descending order
    By ananga in forum Excel General
    Replies: 2
    Last Post: 06-30-2005, 12:05 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