I'm working on a algorithm whereby if a certain condition is met, I want to search a data table. In this data table, 2 conditions should prove true. If this happens, I'd like a corresponding output.
All that sounds good in my head, but let's try visual:
[A] [B] [C] [D] 1] Name Pos PA Wins 2] Dave 1b 668 7 3] Sara c 668 5 4] Jane rf 74 1 5] George 1b 88 2 6] Nefi lf 370 1
The above represents a table of (fairly raw) data. In another part of the sheet, I have determined that Dave is the best person to play (first base) 1b. The catch is that I only know that by Column C. In other words, I understand there are 2 people to play first base and one is more effective, but I don't have the name associated yet.
Frankly, I don't care about his/her name, either. I want to search that data table for the person with 668 PAs (found in Column C) who also plays 1b (found in Column A). I want the return to be what's found in the corresponding cell in Column D.
I know the person has "668" PA and plays "1b" and I want the "7" Wins returned. Normally, I'd just search on who has 668 PAs, but there is no guarantee that will be a unique value. I don't think I have to separate out all the first base players to do this. That's why I'm asking here.
Bookmarks