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:

Some videos you may like

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,108,614
Messages
5,523,916
Members
409,542
Latest member
Shezz01

This Week's Hot Topics

Top