+ Reply to Thread
Results 1 to 7 of 7

SUMPRODUCT function...

  1. #1
    Registered User
    Join Date
    12-20-2006
    Posts
    15

    SUMPRODUCT function...

    Ok... I have tried to understand the SUMPRODUCT function and I think I have a pretty good understanding of it at this point. That being said, I have reached a point in creating my formula where I need help. Part of my formula requires information about the opposing team. So I am attempting to SUMPRODUCT all the times in column a - in the games sheet - when Duke appears * their opponents weighted win% (and afterwards I divide by number of games played to get an average of their opponents weighted win%) However, I am not sure how to write the second part of the equation or what function I should use AFTER - SUMPRODUCT. Here is a the line of the equation in its most basic format that is not working:

    =((SUMPRODUCT(Games!A3:A142=$A3)*(VLOOKUP(Games!C3,Teams!A3:Q22,17))/($F3+$G3)))

    And I have attached the speadsheet and I will highlight the column I am struggling with. If I can fix this I am DONE!!! So any help would be appreciated!!! You guys rock!!!
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    The 17 in your Vlookup coincides with column Q... if you want column P, then you need to use 16 as your column index.

    Also you need the -- in the Sumproduct to convert the TRUE/FALSE array to 1/0 array...

    try:

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-20-2006
    Posts
    15
    That helped... However, there is still a problem. Boston College played four home games, which we have accounted for, against 4 different opponents, and the formula is only registering one opponent four times (games!c3). How can I get the vlookup to follow the column down as different opponents are entered and not be stationary at games!c3? I.e. BC's second home game is against NC State, not Wake Forest... thus, I would like to take into account NC state, and other teams records that BC played. Thanks again... that was a big step forward!!!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Can you give an example of what the actual outcome for Q3 should be and how you got it?

  5. #5
    Registered User
    Join Date
    12-20-2006
    Posts
    15
    Sure... Take a look at the speadsheet... I have highlighted the nine opponents of Boston College... (Virginia Tech counts twice because they played twice and thus I highlighted them in green.) On the Games worksheet I have highlighted the games that reference the opponents of boston college. So... mathematically what the formula needs to look like once the numbers are found is this:

    .685 <wake> + .251 <nc state> + .49 <georgia tech> + .986 <virginia tech> + .514 <florida st> + .408 <maryland> + .686 <clemson> + .186 <miami> + .986 <virginia tech> / 9 <number of games played>

    Hope this made more sense, and if you know of a better way of doing this other than a sumproduct with an embedded vlookup for each column that has a team name in it on the games worksheet feel free to tell me... Thanks for all your help!!!
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So what I did was add 2 extra helper columns in the Games Sheet (i inserted them, but you can hide them). I then did a Vlookup of the Adjusted Points for the Home/Away teams...

    Then in the Teams sheet I summed together 2 Sumif's that Sum the Adjusted Points based on whether the HOME/AWAY team is the team in column A of the Teams sheet. Then divided this sum by the total games played...

    Please see attached.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-20-2006
    Posts
    15
    Uggggggg... I should have known to make a new column with the vlookup to reference!!! That is it!!! Thank you so much for your help!!! I think I can get it from here. You are the man!!!

+ 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