+ Reply to Thread
Results 1 to 2 of 2

Cannot sort largest to smallest; Excel tries to sort as text due to blanks from formula

  1. #1
    Registered User
    Join Date
    04-16-2015
    Location
    San Diego, California, USA
    MS-Off Ver
    2010
    Posts
    2

    Cannot sort largest to smallest; Excel tries to sort as text due to blanks from formula

    I have a spreadsheet of 31 columns. Rows 1-16 have data in them, but I do not want to sort them. They are calculating amounts, percentages, etc using a variety of functions (count, sum, etc).

    I want to sort the data starting from row 18 down using data filter, controlled by one column that should be returning numeric values. Here is the formula in that column:
    =IF(L18="","",IF(R18+Q18-P18=0,0,R18+Q18-P18))
    The data in column L is text, if that means anything. The data in R, Q, and P are all numbers, which are calculated from other numbers pasted into columns C thru J.

    I have selected row 17, which contains all my headers, and added a data filter. When I select the filter button on cell S17, it wants to sort the column as if text (sort A to Z, sort Z to A), although the results there are mainly numbers. I believe it is inserting the "" results as blanks.

    The irritating thing is this was sorting as numbers 2 days ago. This is a template I am constantly editing daily, so I cannot just go back to the one that was working because that would be 2 days worth of edits lost. I added columns 31 and 32 and when I un-filtered and re-filtered row 17 to include these additions, that's when this problem arose.

    I have searched on the internet and found many forums attempting to solve different versions of this issue, but none of them match what I need to do. I want to sort largest to smallest anything resulting in negative numbers, positive numbers, or zeros, which should be anything that has data in column L, and leave anything else out of the filter/sort. I cannot just remove blanks, as this is a template used by my entire department and the number of rows of data they paste into columns A to L can range in number of rows from 1 to 100s. I want to avoid having to use VBA or a macro. I know it is possible to avoid that, as this was just working the other day. I just don't know what I did to break it.

    HELP!!!

  2. #2
    Registered User
    Join Date
    04-16-2015
    Location
    San Diego, California, USA
    MS-Off Ver
    2010
    Posts
    2

    Re: Cannot sort largest to smallest; Excel tries to sort as text due to blanks from formul

    The quick fix being used right now is to unselect "blanks" from the filter and sort A to Z to have the largest numbers on top, then zeros, then smallest numbers. When I look at the sheet when it was working, there is nothing listed to filter by when no data is pasted in. Now that there is a problem, with no data pasted in, you can filter in/out (Blanks). There was NO CHANGE to the formula between the worksheets or format though. It is Custom format, just numbers with no places after the decimal vs. 2.

+ 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. How Sort by Largest to Smallest Column by Formula
    By termal in forum Excel General
    Replies: 10
    Last Post: 01-08-2014, 01:17 PM
  2. Sort largest to smallest - VBA
    By Ricardo Mass in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2013, 09:05 AM
  3. Sort Largest to smallest automatically
    By jmwilson in forum Excel General
    Replies: 6
    Last Post: 05-06-2012, 07:05 PM
  4. Sort Largest to Smallest For Column Pairs
    By bluestarcloudx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2012, 08:19 PM
  5. Excel 2007 : sort smallest number to largest
    By ravihotwok in forum Excel General
    Replies: 1
    Last Post: 12-06-2011, 11:35 AM

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