+ Reply to Thread
Results 1 to 7 of 7

Data taken from other worksheets get messed up upon sorting

  1. #1
    Registered User
    Join Date
    04-14-2021
    Location
    Graz, Austria
    MS-Off Ver
    Microsoft Excel for Mac 16.47.1
    Posts
    4

    Data taken from other worksheets get messed up upon sorting

    Hi everybody!

    I have been using Excel for simple calculations of scientific data sheets for many years, but have no special knowlege of the program. Now my daughter (who is a school teacher and has never used Excel before) asked me to make her a sheet for calculation of marks. I organized the workbook in 6 sheets, 4 quarters and 2 tables for the certificates after halfyear and final. The names of the kids as well as the data for calculation of the final marks in the 2 certificates are taken from the scores in the quarter sheets. So far, everything works fine. However, when the list in one sheet is sorted, either by the names of the kids or by their scoring, the resulting certificate sheets get messed up.

    Obviously, I would need a way to make the reference to the fields in other sheets relative and not absolute. I searched the www for hours and found some discussions of the problem, but unfortunately I don't understand anything due to lack of experience with Excel. I uploaded the file as an attachement, but didn't mange to include it here. Clicking on the link icon results in an empty white field. So I uploaded the file to my cloud and provided the link, resulting in an error message telling me that I am not allowed to post links before having posted other stuff. No idea what I could post except my question.

    Is there a simple (!) way to tell Excel to stick with the reference fields in other sheets after sorting? Please apologize if the answer to my question could be found somewhere else and I didn't realize it. If so, reference to relevant posts or other sources would be helpful. But consider that I need it simple.

    I would highly appreciate your help! Thank you in advance!

    Edit: The attachement is there! Please apologize German language in the file, but I didn't want to mess up anything by changing names. The certificate sheets are HJZ and JZ (Halbjahreszeugnis and Jahreszeugnis).
    Attached Files Attached Files
    Last edited by Beli99; 04-14-2021 at 02:45 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Data taken from other worksheets get messed up upon sorting

    I would use the vlookup function to make sure that the structure is maintained in the two sheets

    For example in HJZ in B2 =(VLOOKUP([@Name],Tabelle1[@[Name]:[Note schriftlich 1 ]],4,0)+VLOOKUP([@Name],Tabelle2[@[Name]:[Note schriftlich 2]],4,0))/2

    Use this example to modify the rest of the cells.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-14-2021
    Location
    Graz, Austria
    MS-Off Ver
    Microsoft Excel for Mac 16.47.1
    Posts
    4

    Re: Data taken from other worksheets get messed up upon sorting

    Thank you, Alan for your fast reply. As I have no idea at all about the rationale behind the function you suggested, I simply reproduced it exactly (except language) in B2 as follows:

    I get the error message about links and images as soon as I try to include the function!

    According to google, SVERWEIS is the German expression for VLOOKUP. In addition, I replaced your "Tabelle 1" and "Tabelle 2" with the names of the respective worksheets Q1 and Q2 (otherwise the function wouldn't make sense, I suppose). Everything else was identical (triple checked).

    Upon "enter", I get an error message, telling me that the syntax of this name is not correct and that I should check whether the name begins with a letter or with "_", doesn't contain spaces, and is not in conflict with another name in the workbook. No idea what could be wrong. The problem appears to be more sophisticated than I expected, and I don't see a chance to get this done for the whole file. Reading the Excel instructions when using the formula assistant for "SVERWEIS" left me more confused than I had been before.

    But there is one more thing I'd like to know before giving up. What do the numbers "4,0" mean after the two terms in the function? I have seen such numbers quite often while searching the internet. My searches revealed SVERWEIS as a possible solution, but needless to say that I didn't get the idea behind.

    Many thanks again for your efforts, Alan. I will inform my daughter that her daddy is too dumb to meet her request. ;-)

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Data taken from other worksheets get messed up upon sorting

    The 4 means that you want the data from column 4 of the lookup range. The zero tells excel to find the exact item. Here is tutorial to help you. Can't let your daughter know that you are stumbling. We will get you to where you need to be. Don't give up yet.

    https://www.techonthenet.com/excel/formulas/vlookup.php

    Post back if you need more help

    Alan

  5. #5
    Registered User
    Join Date
    04-14-2021
    Location
    Graz, Austria
    MS-Off Ver
    Microsoft Excel for Mac 16.47.1
    Posts
    4

    Re: Data taken from other worksheets get messed up upon sorting

    Thank you for your encouraging words and the link to an apparently straight forward tutorial. And last but not least thank's for wasting your time with a presumably trivial problem of a newbie.

    Citation from your link: "The VLOOKUP function is actually quite easy to use once you understand how it works!" The crucial part of this sentence comes after "easy to use". lol

    I will work myself through it and let you know the result.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,805

    Re: Data taken from other worksheets get messed up upon sorting

    This might be helpful to you: https://en.excel-translator.de/
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    04-14-2021
    Location
    Graz, Austria
    MS-Off Ver
    Microsoft Excel for Mac 16.47.1
    Posts
    4

    Re: Data taken from other worksheets get messed up upon sorting

    As promised I wish to update the current state of my sorting problem. Through a search in my facebook community I found a guy who solved the problem via macros in VBA.

    I attach the workbook in which the sorting has bene implemented in one of the sheets. The rest is under construction.

    As I had never touched macros in Excel, I would have had no chance to get this done. But now I started with a basic VBA video course.

    Thanks again for your efforts!
    Attached Files Attached Files

+ 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. Messed up the sorting
    By Flippo77 in forum Excel General
    Replies: 4
    Last Post: 03-03-2021, 08:36 AM
  2. Data messed up with certain changes, and can't undo?!
    By mchlbrmn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-04-2020, 07:09 PM
  3. Sorting code messed up - multiple shees
    By jokris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2016, 12:03 PM
  4. Sorting data in all worksheets
    By Tyso in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-05-2013, 07:14 AM
  5. Rows From Table Get Messed Up When Sorting. How to fix?
    By Gard5096 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 08:56 PM
  6. Linking messed up when Sorting
    By Jugglertwo in forum Excel General
    Replies: 1
    Last Post: 03-17-2006, 04:25 PM
  7. [SOLVED] Excel data messed up after inserting & updating
    By Malky Wullur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2005, 09:10 AM

Tags for this Thread

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