+ Reply to Thread
Results 1 to 9 of 9

Sorting

  1. #1
    Registered User
    Join Date
    11-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    8

    Sorting

    Whenever i try to sort name from A-Z my calculations gets messed up for some reason, like my Average and etc I've added my excel worksheet in the attachment to get a better idea of what I'm saying.
    Attached Files Attached Files
    Last edited by Khoori7; 11-25-2013 at 01:14 AM.

  2. #2
    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,944

    Re: Sorting

    Hi and welcome to the forum

    You need to use absoluting on your ranges so they dont change when copying/sorting etc...
    =INDEX('Computer grades'!$E$2:$E$20,MATCH('Student Information'!$B2,'Computer grades'!$A$2:$A$20,0))
    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

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sorting

    this formula is wrong any way it only works because both sheets are the same layout
    =INDEX('Computer grades'!E2:E20,MATCH('Student Information'!B2:B20,'Computer grades'!A2:A20,0))
    change it to what fdibbins has put
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    11-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Sorting

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    You need to use absoluting on your ranges so they dont change when copying/sorting etc...
    =INDEX('Computer grades'!$E$2:$E$20,MATCH('Student Information'!$B2,'Computer grades'!$A$2:$A$20,0))
    Hey thanks that actually worked and thanks for your welcome!
    I have another question if you don't mind me asking.
    This is my search box..
    http://i.imgur.com/RmoeChO.png
    When i enter a correct result but if i enter an invalid student
    http://i.imgur.com/ctfcTLD.png
    It shows N/A can i make it say "Information not found"

    Quote Originally Posted by martindwilson View Post
    this formula is wrong any way it only works because both sheets are the same layout
    =INDEX('Computer grades'!E2:E20,MATCH('Student Information'!B2:B20,'Computer grades'!A2:A20,0))
    change it to what fdibbins has put
    Oh thanks mate, I changed them all to the same thing, so basically the highlighted part was wrong by my part right?
    Last edited by Khoori7; 11-24-2013 at 10:05 PM.

  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,944

    Re: Sorting

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

  6. #6
    Registered User
    Join Date
    11-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Sorting

    Quote Originally Posted by FDibbins View Post
    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)
    Here you go it's in the search tab.
    Attached Files Attached Files

  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,944

    Re: Sorting

    wrap the formula in IFERROR...
    =IFERROR(INDEX('Student Information'!$A:$E,MATCH(Search!$B$2&"*",'Student Information'!B:B,0),2),"")

    Do that for all of them

  8. #8
    Registered User
    Join Date
    11-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Sorting

    Thank you very much for your help.

  9. #9
    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,944

    Re: Sorting

    You are most welcome

+ 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. Sorting by Date--Need help when sorting by 2-digit year
    By Farris_TN in forum Excel General
    Replies: 3
    Last Post: 06-20-2013, 11:20 AM
  2. Sorting 2 data ranges by comparing one column in each and sorting to match
    By MDKsmiffy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2013, 03:30 PM
  3. Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2013, 12:53 PM
  4. [SOLVED] Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 12:43 PM
  5. Sorting and Delete rows meeting criteria based on sorting criteria
    By ron2k_1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2011, 02:40 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