Return the value of the cell above/below a specific cell based on a different cell?

  • Thread starter Thread starter DrSues02
  • Start date Start date
D

DrSues02

I know the title sounded complicated...Here is what I'm trying to do.

I have a sheet with a list of a bunch of teams.

Say the teams go in order like this:

Houston +5
Southern Miss -5
Clemson -10
Virginia 10

This is an example of two games...Houston vs Southern Miss and Clemso
vs Virginia.

I also have seperate sheets in the same workbook for each team.

I want to put a formula on say Houston's sheet that will look up th
team they are playing from a list of a hundred teams.

The team they are playing is going to be in the cell directly above o
below the cell that the team name is in. In Houston's case, Souther
Miss is directly below...if the situation was reversed, then Houston i
directly above Southern Miss.

However, the team they are playing definitely has the same number i
the second column, only the negative of it.

So, if you picked a spot in the middle of Column A with all of th
teams, you could tell which team played the other by checking th
numbers (you would see that Southern Miss had -5, Clemson had +5, an
they were directly next to each other)

How would I go about doing this? The number (which is in Column B) i
entered on the individual team sheets, and I've tried using somethin
like the negative of that number, with no success.

Another idea that I had would be to look up the row that the team nam
was in. If I looked up Houston, and it was in row #50, the team the
would be playing would have to be directly above them.

If they were in row #49, the team they were playing would have to b
directly below them.

This is true because there is always an even amount of teams and i
starts in row #1.

Any ideas on how to set up this in a formula
 
Assuming your list is in col. A on a sheet called "game",
and A1 holds the name of the team on another worksheet,
try:

=INDEX(game!A1:A500,MATCH(-INDEX(game!B1:B500,MATCH
(A1,game!A1:A500,0)),game!B1:B500,0))

HTH
Jason
Atlanta, GA
 
Back
Top