+ Reply to Thread
Results 1 to 7 of 7

Averaging Based on criteria on separate table

  1. #1
    Registered User
    Join Date
    05-26-2022
    Location
    usa
    MS-Off Ver
    365
    Posts
    4

    Averaging Based on criteria on separate table

    Hi, I have two columns: Factory and Margin. I want to do an average only on factories from a specific country. The factory/country connection is available in separate table.
    Attached Files Attached Files
    Last edited by jam1n; 05-26-2022 at 04:31 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,879

    Re: Averaging Based on criteria on separate table

    Here is a Power Query solution attached in the file

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    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
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Averaging Based on criteria on separate table

    By Factory (Place in G7 and drag formula down through G10
    Please Login or Register  to view this content.
    Is China
    Please Login or Register  to view this content.
    Is NOT China
    Please Login or Register  to view this content.

    Many ways to go about this...its what you wish to do in the end... Just like where it says China in the above... that can be a reference to the name on the sheet

    Say yo used your F Column, put this in H since we put the straight average in G with the suggested above...

    H7= Average if is Country
    Please Login or Register  to view this content.
    and in I
    I7 = Average if is NOT Country
    Please Login or Register  to view this content.
    -If you think you are done, Start over - ELeGault

  4. #4
    Registered User
    Join Date
    05-26-2022
    Location
    usa
    MS-Off Ver
    365
    Posts
    4

    Re: Averaging Based on criteria on separate table

    Love this, love power query. However, power query isnt an option here. thank you though!

  5. #5
    Registered User
    Join Date
    05-26-2022
    Location
    usa
    MS-Off Ver
    365
    Posts
    4

    Re: Averaging Based on criteria on separate table

    impressive! Thanks so much that is perfect.

  6. #6
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Averaging Based on criteria on separate table

    PQ aside - does what I gave work? or you still looking for more? - if it does dont forget to set this to resolved!

  7. #7
    Registered User
    Join Date
    05-26-2022
    Location
    usa
    MS-Off Ver
    365
    Posts
    4

    Re: Averaging Based on criteria on separate table

    ELeGault - yes, your response is exactly what I needed. I replied to alansidman before I saw your post.

    Thanks all.

+ 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. [SOLVED] Finding a value based on three criteria (two in a separate column, one in a separate row)
    By sepehr485 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-02-2022, 02:16 PM
  2. Replies: 19
    Last Post: 02-04-2020, 07:21 PM
  3. List Items Based on Criteria in Separate Table
    By xtinct2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2019, 04:10 PM
  4. [SOLVED] Averaging # based on several criteria in a range
    By Phlegon_of_Tralles in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-11-2019, 08:03 AM
  5. [SOLVED] Need your help averaging based on month & other criteria
    By hennakao in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-14-2017, 10:13 AM
  6. [SOLVED] Split table, based on two criteria, into separate workbooks
    By gingert88 in forum Excel General
    Replies: 6
    Last Post: 07-10-2012, 06:08 PM
  7. Replies: 4
    Last Post: 11-22-2010, 12:57 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