Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Display "Sort by" Heading

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Algonquin Industries
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a sales report with headings such as: Customer Name, 2001 Sales, 2002 Sales, 2002 Plan, etc.

    I want to automatically display the "sort by" heading on the worksheet, and whether it is increasing or decreasing.

    For example: "Sorted by decreasing 2002 sales"

    Thanks,
    Dave

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Millbank, London, UK
    Posts
    1,790
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-06 07:11, dmmitchell wrote:
    I have a sales report with headings such as: Customer Name, 2001 Sales, 2002 Sales, 2002 Plan, etc.

    I want to automatically display the "sort by" heading on the worksheet, and whether it is increasing or decreasing.

    For example: "Sorted by decreasing 2002 sales"

    Thanks,
    Dave
    Assuming, say, your 2002 Sales start in C2, with the required heading in C1, this should get you started :

    ="Sorted by "&IF(C2=MIN(C2:C1000),"in",IF(C2=MAX(C2:C1000),"de","NEEDS SORTING"))&"creasing 2002 Sales"

    it's not foolproof though, it just checks to see if the first value is min or max

    adjust the ranges too so they don't look at any totals


    :: Pharma Z - Family drugstore ::

  3. #3
    New Member
    Join Date
    May 2002
    Location
    Algonquin Industries
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-06 08:05, Chris Davison wrote:
    Assuming, say, your 2002 Sales start in C2, with the required heading in C1, this should get you started :

    ="Sorted by "&IF(C2=MIN(C2:C1000),"in",IF(C2=MAX(C2:C1000),"de","NEEDS SORTING"))&"creasing 2002 Sales"

    it's not foolproof though, it just checks to see if the first value is min or max

    adjust the ranges too so they don't look at any totals


    Thanks Chris, but what I really want is a way to look at the settings selected when the data was last sorted. When you open the sort dialog box, it displays the settings from your last sort. (Heading or headings & ascending or descending) These settings must be stored by excel somewhere. I want to be able to print out their values.

    I would accept a formula which analyzes the data table and figures out how it must have been sorted, but this sounds like a kludgy solution.

    Thanks,
    Dave

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Millbank, London, UK
    Posts
    1,790
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    kludgy's my middle name



    sounds like you're going to need one of our VBA coding experts to help you out with those internal sorting settings

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •