+ Reply to Thread
Results 1 to 6 of 6

Vlookup, counitf, other problem

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    manchester, iowa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Vlookup, counitf, other problem

    Attached is a workbook I am building to seed wrestlers in local tournaments. Currently I am running into an issue looking up who a wrestler has beaten or lost to on their personal sheet(ie. 'Wrestler A' columns B and E) and comparing it to the 'Home Sheet'!A2:100 list of wrestlers in attendance. on 'Home Sheet' columns F and G I need to return like I have in F2 for each wrestler both wins over and lost to wrestlers.

    The end result is that I want to assign points based on this field and add it to column O so that I can calculate it into the seeding field.
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Vlookup, counitf, other problem

    Try this user defined function.

    Please Login or Register  to view this content.
    Open the VBA editor (Alt F11). Insert a new module (insert - module) and paste in the above. Go back to sheet (Alt F11) and type =GetWins(A2) into F2 and copy down.

    This relies on a strict naming convention and column placement for your individual sheets.
    Martin

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup, counitf, other problem

    If you add a UserDefined (ALT+F11, INSERT|Module and paste) function like:

    Please Login or Register  to view this content.
    then use formula:

    =SUBSTITUTE(TRIM(aconcat(IF('Wrestler A'!$E$2:$E$12="W",'Wrestler A'!$B$2:$B$12,"")," "))," ",",")

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.

    same in Losses column, just change "W" to "L"

    You can use INDIRECT to copy down and get to appropriate sheet based on column A having same name as sheet name.

    e.g.

    =SUBSTITUTE(TRIM(aconcat(IF(INDIRECT("'"&$A2&"'!$E$2:$E$12")="W",INDIRECT("'"&$A2&"'!$B$2:$B$12"),"")," "))," ",",")
    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.

  4. #4
    Registered User
    Join Date
    02-13-2012
    Location
    manchester, iowa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Vlookup, counitf, other problem

    Quote Originally Posted by mrice View Post
    Try this user defined function.

    Please Login or Register  to view this content.
    Open the VBA editor (Alt F11). Insert a new module (insert - module) and paste in the above. Go back to sheet (Alt F11) and type =GetWins(A2) into F2 and copy down.

    This relies on a strict naming convention and column placement for your individual sheets.
    KINDA WORKS. ADDITIONS.

    Part 1: Small change. (see 'Home Sheet'!G3 which should read "A,D,L,B,P" only) So, the beaten wrestler also has to have been entered on 'Home Sheet'!A2:17. If they are not, then they are not to be entered into column G since the match had no bearing on this specific group of wrestlers.

    Part 2: I have to now apply the DATE column for Wrestler A,B,C,etc. If Wrestler A wrestled Wrestler B two times and won one and lost one within two weeks of eachother then it cannot show up on the list. I call that a wash and it does not calculate into the seeding of the wrestler.

    Also, there will be 16 Wrestler sheets (A through P) total

    Any idea.
    Attached Files Attached Files

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Vlookup, counitf, other problem

    Elaboration of the function to meet the first question

    Please Login or Register  to view this content.
    The second one is more tricky, what about cases where there have been three bouts within the two week period or does this never happen?

  6. #6
    Registered User
    Join Date
    02-13-2012
    Location
    manchester, iowa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Vlookup, counitf, other problem

    very very rare for three to happen in two weeks. four can never happen. So if it was 3 in two weeks then the majority wins the seed. So the wrestler with 2 wins should be given the priority or points or however we do that.

+ 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