Not sure if I understand what your asking, but sounds like =vlookup might work???
You can use the INDEX and MATCH functions together to find a value in a list based on a row or column label, or both labels. INDEX returns a reference to a cell at the intersection of a particular row and column within a range, and MATCH finds the relative position of a cell within a range, based on a value you want to look up. In combination, these functions return a value based on either a row or column label. The Lookup Wizard uses INDEX and MATCH in the formulas it creates.