+ Reply to Thread
Results 1 to 6 of 6

Weighted Average of Non Numeric Data

  1. #1
    Registered User
    Join Date
    05-10-2005
    MS-Off Ver
    Office 2007 & 2010
    Posts
    67

    Weighted Average of Non Numeric Data

    I believe the description is the best way to describe my question. In the attached I have two tables of data. The Conn Qty (column C) is broken down into qty by depth in the lower data set. What I would like to determine is the most common, or weighted average?, of what the chart calls "Load". Loads are are an alpha designation A-L or can be blank.

    The attached example has 52 conns from 0-11.4 deep. Of those, 19 are labeled with a load "A", while the rest are of various other call outs (blank, B, F, C or H). Since "A" makes up the most common (19/52, or 36%) the yellow highlighted cell would return A.

    I know I could get this figured out with helper columns, etc. but this is included in a much larger sheet and I am attempting to determine the value without much extra side data. Not sure if the "Blank" option throws this into a more complex questions also.

    As always, all help is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Weighted Average of Non Numeric Data

    I tried my best but I can't solve this without a 9 x 11 helper "table". However, if the concern with helpers is finding an appropriate place on an already busy worksheet then one idea might be to relocate the helper table to it's own worksheet if that would be acceptable. That is what I have done here and I will post it as nobody else (yet) has come up with a helperless solution.

    I created a new worksheet called "helper" as follows:

    weightedAvg.png

    The formulas on the "helper" worksheet table are your "Qty By Depth" formula with an added condition that selects for the load in row-1, so in A2 copied down and across to I11:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column-I caters for blanks in the "Load" column.

    The final answer with the following formula is in main!G23 copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Attached is your workbook with the above changes.

    Hopefully this is some use to you pending someone posting a "helperless" solution.
    Attached Files Attached Files

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Weighted Average of Non Numeric Data

    Hi,

    So a 'blank' Load is an equally permissible return?

    Perhaps, in G23:

    =IF(COUNTIFS(A$3:A$18,">="&B23,A$3:A$18,"<"&C23),T(LOOKUP(1,0/FREQUENCY(0,1/(1+SUMIFS(C$3:C$18,A$3:A$18,">="&B23,A$3:A$18,"<"&C23,B$3:B$18,B$3:B$18&""))),B$3:B$18)),"No Solution")

    and copied down.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Registered User
    Join Date
    05-10-2005
    MS-Off Ver
    Office 2007 & 2010
    Posts
    67

    Re: Weighted Average of Non Numeric Data

    XOR LX,

    This works great! This is exactly what I was looking for. The only alteration I will make is changing "No Solution" to return a blank, as this is the default Load in my scenario.
    Thank you for your help!

    Geoff,

    Your solution is also appreciated. It is along the lines of what I was thinking myself, with the use of helper columns.

    Both solutions are greatly appreciated.

    Thank you!

    Marking Solved!

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Weighted Average of Non Numeric Data

    You're welcome!

    Cheers

  6. #6
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Weighted Average of Non Numeric Data

    Thanks for the feedback. Glad you got your "helperless" solution. Now I have some homework to do to understand XOR LX's solution

+ 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. Weighted Average Function for Series Weighted by Increments of 1
    By kratsexcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2018, 11:38 AM
  2. [SOLVED] Weighted average calculation in difference set of data
    By Chocobo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2018, 11:04 AM
  3. Replies: 0
    Last Post: 02-15-2018, 03:04 AM
  4. Weighted Average on Filter data
    By red1234 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-28-2017, 10:53 AM
  5. [SOLVED] Weighted Average Sumproduct Multiple Criteria with Data in One Column
    By azaremb in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-11-2014, 03:14 PM
  6. Weighted Average with Data in Same, One Column
    By azaremb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2014, 10:59 AM
  7. Excluding Non Mature Data and Weighted Average
    By helpwithexcel1 in forum Excel General
    Replies: 2
    Last Post: 03-15-2010, 05:14 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