How to combine related data in Excel using a common field and averages





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have some data in Excel in the following format (represented as CSV for simplicity here). Each row is a test result for a user. Each user has undergone multiple tests. For example:



Name,Speed,Agility,Strength
Bob,3,2,1
Fred,4,3,2
Sue,6,3,8
Bob,,4,5
Fred,,1,2
Sue,,3,2


I need to end up with 1 row for each user. The test results for a given user should be combined by averaging the values. For cases of missing values (like speed which is only recorded once per user), it should just take the 1 value which is present.



I want to preserve the original data, but somehow generate the combined set of rows separately on demand.



Any suggestions on where to start? I'm using Excel via Office 365 (version 1901 Build 11231.20130 Click-to-Run) on Windows 10 64-bit.










share|improve this question


















  • 1





    Pivot tables could work for this. In "Value Field Settings" you can select Average for each field and then select Max for the speed field.

    – Rey Juna
    Feb 7 at 3:15


















0















I have some data in Excel in the following format (represented as CSV for simplicity here). Each row is a test result for a user. Each user has undergone multiple tests. For example:



Name,Speed,Agility,Strength
Bob,3,2,1
Fred,4,3,2
Sue,6,3,8
Bob,,4,5
Fred,,1,2
Sue,,3,2


I need to end up with 1 row for each user. The test results for a given user should be combined by averaging the values. For cases of missing values (like speed which is only recorded once per user), it should just take the 1 value which is present.



I want to preserve the original data, but somehow generate the combined set of rows separately on demand.



Any suggestions on where to start? I'm using Excel via Office 365 (version 1901 Build 11231.20130 Click-to-Run) on Windows 10 64-bit.










share|improve this question


















  • 1





    Pivot tables could work for this. In "Value Field Settings" you can select Average for each field and then select Max for the speed field.

    – Rey Juna
    Feb 7 at 3:15














0












0








0








I have some data in Excel in the following format (represented as CSV for simplicity here). Each row is a test result for a user. Each user has undergone multiple tests. For example:



Name,Speed,Agility,Strength
Bob,3,2,1
Fred,4,3,2
Sue,6,3,8
Bob,,4,5
Fred,,1,2
Sue,,3,2


I need to end up with 1 row for each user. The test results for a given user should be combined by averaging the values. For cases of missing values (like speed which is only recorded once per user), it should just take the 1 value which is present.



I want to preserve the original data, but somehow generate the combined set of rows separately on demand.



Any suggestions on where to start? I'm using Excel via Office 365 (version 1901 Build 11231.20130 Click-to-Run) on Windows 10 64-bit.










share|improve this question














I have some data in Excel in the following format (represented as CSV for simplicity here). Each row is a test result for a user. Each user has undergone multiple tests. For example:



Name,Speed,Agility,Strength
Bob,3,2,1
Fred,4,3,2
Sue,6,3,8
Bob,,4,5
Fred,,1,2
Sue,,3,2


I need to end up with 1 row for each user. The test results for a given user should be combined by averaging the values. For cases of missing values (like speed which is only recorded once per user), it should just take the 1 value which is present.



I want to preserve the original data, but somehow generate the combined set of rows separately on demand.



Any suggestions on where to start? I'm using Excel via Office 365 (version 1901 Build 11231.20130 Click-to-Run) on Windows 10 64-bit.







microsoft-excel






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 6 at 22:44









NerdtronNerdtron

156110




156110








  • 1





    Pivot tables could work for this. In "Value Field Settings" you can select Average for each field and then select Max for the speed field.

    – Rey Juna
    Feb 7 at 3:15














  • 1





    Pivot tables could work for this. In "Value Field Settings" you can select Average for each field and then select Max for the speed field.

    – Rey Juna
    Feb 7 at 3:15








1




1





Pivot tables could work for this. In "Value Field Settings" you can select Average for each field and then select Max for the speed field.

– Rey Juna
Feb 7 at 3:15





Pivot tables could work for this. In "Value Field Settings" you can select Average for each field and then select Max for the speed field.

– Rey Juna
Feb 7 at 3:15










1 Answer
1






active

oldest

votes


















0














Well, I ended up using VBA macro code to do this and it worked pretty well. I saved the file as a macro enabled workbook and then had to tweak some security options, but got it working.



The macro, when run, gathers all the data from the data entry worksheet and dynamically builds the results worksheet.



I'm betting Rey Juna's suggestion about pivot tables would also be valid, but I have no idea how to work with those, but I am a developer so writing the macro was more comfortable for me :)






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1402896%2fhow-to-combine-related-data-in-excel-using-a-common-field-and-averages%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Well, I ended up using VBA macro code to do this and it worked pretty well. I saved the file as a macro enabled workbook and then had to tweak some security options, but got it working.



    The macro, when run, gathers all the data from the data entry worksheet and dynamically builds the results worksheet.



    I'm betting Rey Juna's suggestion about pivot tables would also be valid, but I have no idea how to work with those, but I am a developer so writing the macro was more comfortable for me :)






    share|improve this answer




























      0














      Well, I ended up using VBA macro code to do this and it worked pretty well. I saved the file as a macro enabled workbook and then had to tweak some security options, but got it working.



      The macro, when run, gathers all the data from the data entry worksheet and dynamically builds the results worksheet.



      I'm betting Rey Juna's suggestion about pivot tables would also be valid, but I have no idea how to work with those, but I am a developer so writing the macro was more comfortable for me :)






      share|improve this answer


























        0












        0








        0







        Well, I ended up using VBA macro code to do this and it worked pretty well. I saved the file as a macro enabled workbook and then had to tweak some security options, but got it working.



        The macro, when run, gathers all the data from the data entry worksheet and dynamically builds the results worksheet.



        I'm betting Rey Juna's suggestion about pivot tables would also be valid, but I have no idea how to work with those, but I am a developer so writing the macro was more comfortable for me :)






        share|improve this answer













        Well, I ended up using VBA macro code to do this and it worked pretty well. I saved the file as a macro enabled workbook and then had to tweak some security options, but got it working.



        The macro, when run, gathers all the data from the data entry worksheet and dynamically builds the results worksheet.



        I'm betting Rey Juna's suggestion about pivot tables would also be valid, but I have no idea how to work with those, but I am a developer so writing the macro was more comfortable for me :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 14 at 2:34









        NerdtronNerdtron

        156110




        156110






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1402896%2fhow-to-combine-related-data-in-excel-using-a-common-field-and-averages%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Список кардиналов, возведённых папой римским Каликстом III

            Deduzione

            Mysql.sock missing - “Can't connect to local MySQL server through socket”