If statement with reference to 2 matching fields in the same row

8BallGuy

New Member
Joined
Sep 23, 2014
Messages
2
Hi all

Having issues figuring out how to draw data from a specific field for a player on a certain team. The problem is that players can be on multiple teams and each player on a team needs a minimum number of games player on that said team. So I need to reference the team ID and the player ID and if they match in the same row then I need to display the number of games played on the score sheet.

Sooo... Looking to do something like this

If A and B match in one row on Roster sheet print field C from the same row from Roster sheet in D on Scoresheet.
Currently I am using this
=IFERROR(VLOOKUP($C15,Player!$B$1:$O$846,2,0),"")

The Player sheet unfortunately is the players league wide stats so wouldn't help.

Thanks in advance :)
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

8BallGuy

New Member
Joined
Sep 23, 2014
Messages
2
Going to try to be a little clearer with my question.

If A and B Match in one row on sheet 2 print C from same row in F on Sheet 1

I have a Rosters sheet and a score sheet. I need the games played by a player on a specific team on the score sheet. I started drawing the overall games played on another sheet but that wrong. I used this to draw the wrong data

Code:
<code><code>=IFERROR(VLOOKUP($C15,Player!$B$1:$O$846,2,0),"")</code></code>

The player sheet is the players league wide total so no good for this and the formula doesn't help without the if matches stuff.
</pre>

Actual fields
In F15
If C13 (Scoresheet) matches B (Rosters) and C15 (Scoresheet) matches E (Rosters) of the same row print F (Rosters)

Trying to wrap my head around it but could use some help if possible. How can I do this?

This one of the Scoresheet sheet tables. Top Format is setup for print and the second is just to make it easier visually to answer my question.

Team ID
33017 The Pirates
Player ID GP HC
10101 5 3 Webster, Max
10202 4 4 Bundy, Bud

Team IDTeam NamePlayer IDGames PlayedHandicapPlayer name
33000Team A10101?3Webster, Max
33000Team A10202?4Bundy, Bud
44000Team B10101?3Webster, Max
55000Team C10202?4Bundy, Bud


This is Part of the Rosters Sheet

Team NameTeam IDHandicapPlayerPlayer IDGames
Pooloholics330003Webster, Max101015
Pooloholics330004Bundy, Bud102024
Team B440003Webster, Max101015
Team C550004Bundy, Bud102024
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,598
Messages
5,832,646
Members
430,151
Latest member
Kacbear

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top