+ Reply to Thread
Results 1 to 6 of 6

Lookup Values based on criteria from two sheets

  1. #1
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Lookup Values based on criteria from two sheets

    In my attached worksheet, I would like the green and yellow boxes at the top of my sheet to fill in with numbers supplied by data on that current sheet as well as one other sheet in my worksheet.

    I have a list of 20 teams with a grid of players (N6:AD25) for each team, along with a team budget (AE6:AE25) and a team max bid (AF6:AF25). I would like to have the three boxes up top that are blank look up whatever team I select in cell I3 of the Draft Board sheet to then tell the rest of the sheet what to do based on which team is selected.

    For example, the Green Box cell U2, should say $150 because the remaining budget listed in column AE of the Draft Board sheet for Team 1 is $150. We know to look for team 1's budget because that is the team selected in cell I3.

    For the second Green Box cell AF2, should then say $27.50 because that is the average amount of money spent on the players selected by team 1. We know this because team 1 has 4 players picked in cells N6:AD6 and $110 of the $260 starting budget has been spent. So $110/4 = $27.50. The starting budget is listed in cell C2 of the Settings tab.

    For the final Yellow Box cell AP2, it should say $126 because that is the max bid listed in cell AF6 for Team 1.

    Use column AR To know which team is which for cells N6:AF25.

    Please let me know if you have any questions, thanks!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Lookup Values based on criteria from two sheets

    1st, an observation...
    please oh please try and avoid using merged cells like that, they cause havoc with formulas!! In this case, they are completely unnecessary, just widen your rows and colulms where needed.

    OK
    U2=INDEX($AE$6:$AE$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    AF2=(Settings!$C$2-$U$2)/COUNTIF(OFFSET($M$6,MATCH(--RIGHT(I3,2),$M$6:$M$25,0)-1,1,1,17),">0")
    AP2=INDEX($AF$6:$AF$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: Lookup Values based on criteria from two sheets

    Quote Originally Posted by FDibbins View Post
    1st, an observation...
    please oh please try and avoid using merged cells like that, they cause havoc with formulas!! In this case, they are completely unnecessary, just widen your rows and colulms where needed.

    OK
    U2=INDEX($AE$6:$AE$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    AF2=(Settings!$C$2-$U$2)/COUNTIF(OFFSET($M$6,MATCH(--RIGHT(I3,2),$M$6:$M$25,0)-1,1,1,17),">0")
    AP2=INDEX($AF$6:$AF$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    Thanks for the advice! Works great

  4. #4
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: Lookup Values based on criteria from two sheets

    Quote Originally Posted by FDibbins View Post
    1st, an observation...
    please oh please try and avoid using merged cells like that, they cause havoc with formulas!! In this case, they are completely unnecessary, just widen your rows and colulms where needed.

    OK
    U2=INDEX($AE$6:$AE$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    AF2=(Settings!$C$2-$U$2)/COUNTIF(OFFSET($M$6,MATCH(--RIGHT(I3,2),$M$6:$M$25,0)-1,1,1,17),">0")
    AP2=INDEX($AF$6:$AF$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    One question, if I wanted to make the Average Spent by Player formula blank until a player is put on that team instead of it showing -260 how would I do that?

  5. #5
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: Lookup Values based on criteria from two sheets

    Quote Originally Posted by FDibbins View Post
    1st, an observation...
    please oh please try and avoid using merged cells like that, they cause havoc with formulas!! In this case, they are completely unnecessary, just widen your rows and colulms where needed.

    OK
    U2=INDEX($AE$6:$AE$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    AF2=(Settings!$C$2-$U$2)/COUNTIF(OFFSET($M$6,MATCH(--RIGHT(I3,2),$M$6:$M$25,0)-1,1,1,17),">0")
    AP2=INDEX($AF$6:$AF$25,MATCH(--RIGHT(I3,2),$M$6:$M$25,0))
    Disregard that last post it says zero which is fine, appreciate your help!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Lookup Values based on criteria from two sheets

    Happy to help, thanks for the feedback

+ 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] Lookup Values based on criteria from another sheet
    By mlbdc2012 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-12-2015, 06:35 AM
  2. [SOLVED] Lookup and sum multiple values based on a single criteria in multiple sheets.
    By paulsanett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 12:18 PM
  3. Lookup Multiple Values From a List Based on One Criteria
    By jjcgirl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2013, 03:28 PM
  4. Lookup values from a table based on two criteria
    By Alun in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-03-2012, 05:33 PM
  5. Lookup values based on criteria in two columns
    By ola7mat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2012, 10:14 AM

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