+ Reply to Thread
Results 1 to 9 of 9

Cannot sort calculations in tables....

  1. #1
    Registered User
    Join Date
    03-15-2014
    Location
    Nashville, TN
    MS-Off Ver
    365
    Posts
    33

    Cannot sort calculations in tables....

    Guys; See the attached file, which includes three tabs, each of which has a table with a number next to an entry that is colored.

    What I'm trying to do on the third tab, titled "calculations," is just subtract the number from the middle tab (data 2) from the number in the first tab in that same row (data 1), do this for every number in the table, and have the results show in the table. This part is already done.

    Here is the problem: I can't get the "calculations" table to sort...I need to sort those results by the numbers from least to greatest. It seems to be sorting randomly.

    Not sure what the issue could be. Would appreciate any help. Thanks alot.
    Attached Files Attached Files
    Last edited by pshearer; 01-13-2016 at 09:22 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Cannot sort calculations in tables....

    not sure if one can sort a calculated row of a table like that; as the calculation itself is dependent on the relative location of the values in their respective tables. You could however replace the formula in cell B2 of calculations sheet with
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and drag down. Thereafter, it should sort.

  3. #3
    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,938

    Re: Cannot sort calculations in tables....

    nope, that wont sort either. I have been playing around with this too and cannot think of (an easy) way to do it - the total is based on values from 2 different sheets. Maybe pull both sets into 1 sheet, run the calc and use LARGE() - or SMALL() - to find the largest value, then INDEX/MATCH to find the name
    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

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Cannot sort calculations in tables....

    sorts for me, see attached.
    Attached Files Attached Files

  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
    52,938

    Re: Cannot sort calculations in tables....

    Quote Originally Posted by jewelsharma View Post
    sorts for me, see attached.
    no, actually it doesnt, check again. Sort L to S, it looks like it does, but further down row 23 onwards, it goes S to L
    Likewise S to L, from row 11 onwards it increases

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Cannot sort calculations in tables....

    Hi FDibbins,
    Not sure what you are referring to.
    After Sorting L To S, Row 23 is -12, Row 24 is -14 .... Row 30 is -65.
    Likewise for S to L, Row 11 is +10, Row 12 is +10 ... Row 30 is +156.

    All correctly sorted in both cases. Cheers!
    Jewel

  7. #7
    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,938

    Re: Cannot sort calculations in tables....

    Sorted S to L...
    A
    B
    1
    Attitudes Index
    2
    description
    - 65
    3
    description
    - 42
    4
    description
    - 31
    5
    description
    - 30
    6
    description
    - 25
    7
    description
    - 20
    8
    description
    - 14
    9
    description
    - 12
    10
    description
    1
    11
    description
    10
    12
    description
    10
    13
    description
    16
    14
    description
    23
    15
    description
    24
    16
    description
    28
    17
    description
    29
    18
    description
    33
    19
    description
    54
    20
    description
    58
    21
    description
    59
    22
    description
    67
    23
    description
    68
    24
    description
    71
    25
    description
    77
    26
    description
    93
    27
    description
    122
    28
    description
    139
    29
    description
    139
    30
    description
    156


    Sorted L to S...
    A
    B
    1
    Attitudes Index
    2
    description
    156
    3
    description
    139
    4
    description
    139
    5
    description
    122
    6
    description
    93
    7
    description
    77
    8
    description
    71
    9
    description
    68
    10
    description
    67
    11
    description
    59
    12
    description
    58
    13
    description
    54
    14
    description
    33
    15
    description
    29
    16
    description
    28
    17
    description
    24
    18
    description
    23
    19
    description
    16
    20
    description
    10
    21
    description
    10
    22
    description
    1
    23
    description
    - 12
    24
    description
    - 14
    25
    description
    - 20
    26
    description
    - 25
    27
    description
    - 30
    28
    description
    - 31
    29
    description
    - 42
    30
    description
    - 65

  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
    52,938

    Re: Cannot sort calculations in tables....

    aahh wait, I can see the neg values in my post - I did not see then in the filwe
    You are correct, apologies

  9. #9
    Registered User
    Join Date
    03-15-2014
    Location
    Nashville, TN
    MS-Off Ver
    365
    Posts
    33

    Re: Cannot sort calculations in tables....

    Thanks so much to both of 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. Calculations in Word Tables?
    By MKR in forum Word Formatting & General
    Replies: 2
    Last Post: 03-21-2013, 10:39 AM
  2. Displaying Values in Pivot Tables instead of Calculations
    By casrol in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-06-2012, 08:37 PM
  3. Calculations within Pivot Tables
    By Datech in forum Excel General
    Replies: 4
    Last Post: 03-19-2012, 03:05 PM
  4. Calculations in Pivot Tables
    By mcooper1975 in forum Excel General
    Replies: 3
    Last Post: 06-09-2011, 04:13 PM
  5. tables, references, calculations
    By Poposhka in forum Excel General
    Replies: 6
    Last Post: 05-25-2010, 05:08 PM
  6. [SOLVED] Pivot Tables-Calculations?
    By CrimsonPlague29 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2006, 10:55 AM
  7. [SOLVED] Calculations in pivot tables
    By Kathy P in forum Excel General
    Replies: 0
    Last Post: 04-06-2006, 07:15 PM
  8. Calculations that Refer to Pivot Tables
    By BillM in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2005, 10:29 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