+ Reply to Thread
Results 1 to 4 of 4

Doing a weighted average total on 2 columns

Hybrid View

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Doing a weighted average total on 2 columns

    I've got 2 columns and at the bottom a total weighted average for the 2 columns.

    So for example the formula is Sum(Field2 * Field3) / Sum(Field2)

    This is raw data I copied form a report:

    A1 A2 A3 A4
    --------------------------
    Field1 Field2 Field3
    1 T 1,235 32
    2 U 3,327 7
    3 T 3332 5
    4 U 22333 10
    --------------------------
    Wt avg T Sum(Field3 * Field2) / Sum(Field2) (where Field3 relates to the T Field3 values only)
    Wt avg U Sum(Field3 * Field2) / Sum(Field2) (where Field3 relates to the U Field3 values only)

    I'm not an Excel user much so I was thinking I could create a new column(A5) with a formula that would take Field 3 * Field 2 and then in my Wt Avg at the end just do a Sum(A5) / Sum(A3) or something

    but that seems too much work, there has to be an easier way to get that calc in for my wt avg totals at the bottom using one formula right? I don't know how to code that formula...and again the two totals are dependent on T vs. U rows

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Doing a weighted average total on 2 columns

    This would just be

    =SUMPRODUCT(C2:C5,D2:D5)/Sum(D3:D5)

    does that work?

  3. #3
    Registered User
    Join Date
    07-17-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Doing a weighted average total on 2 columns

    yea I ended up doing that but just thought Excel would at least have a nice out of the box wighted average formula I can just plug my numbers into but ultimately I have to do the work anyway to specify the multiplication cells manually anyway.

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Doing a weighted average total on 2 columns

    Hello
    Does the following work with your sample numbers say in A2:C5, for example the 'T' values?

    =SUMPRODUCT(--(A2:A5="T"),B2:B5,C2:C5)/SUMPRODUCT(--(A2:A5="T"),C2:C5)
    DBY

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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