Hello,
I'm looking for help on a formula to retrieve a value from a table based on two criteria. I'm sure there's probably a fairly easy way to do it, but I'm just struggling to find the best way to do it myself so I'm hoping someone here might be able to help.
I have a list of employees in column A and a list of units in column B. Both employees and units can be repeated in the columns, however each combination of the two is unique.
I also have a look-up table with the employee names listed in the rows and the units listed in the columns. What I'm trying to do is create a formula that will pull a value in the lookup table that matches the employee/unit combo in columns A and B.
[TABLE="width: 271"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Employee1[/TD]
[TD]Unit1[/TD]
[TD]Value from table that matches criteria in column A and B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Employee1[/TD]
[TD]Unit2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Employee1[/TD]
[TD]Unit3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Employee1[/TD]
[TD]Unit4[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Employee2[/TD]
[TD]Unit10[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Employee2[/TD]
[TD]Unit11[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Employee3[/TD]
[TD]Unit5[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Employee3[/TD]
[TD]Unit6[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Employee3[/TD]
[TD]Unit7[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Employee3[/TD]
[TD]Unit8[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Employee3[/TD]
[TD]Unit9[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]Employee3[/TD]
[TD]Unit10[/TD]
[/TR]
</tbody>[/TABLE]
Lookup table:
[TABLE="width: 790"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]Unit1[/TD]
[TD]Unit2[/TD]
[TD]Unit3[/TD]
[TD]Unit4[/TD]
[TD]Unit5[/TD]
[TD]Unit6[/TD]
[TD]Unit7[/TD]
[TD]Unit8[/TD]
[TD]Unit9[/TD]
[TD]Unit10[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Employee1[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]10,000[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]10,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Employee2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5,000[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Employee3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]10,000[/TD]
[TD="align: right"]15,000[/TD]
[TD="align: right"]9,000[/TD]
[TD="align: right"]4,000[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Employee4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]6,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Employee5[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Employee6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Employee7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Employee8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]17,000[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Employee9[/TD]
[TD][/TD]
[TD="align: right"]4,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5,000[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Employee10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]15,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]Employee11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2,000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help is GREATLY appreciated!!
Thanks!
I'm looking for help on a formula to retrieve a value from a table based on two criteria. I'm sure there's probably a fairly easy way to do it, but I'm just struggling to find the best way to do it myself so I'm hoping someone here might be able to help.
I have a list of employees in column A and a list of units in column B. Both employees and units can be repeated in the columns, however each combination of the two is unique.
I also have a look-up table with the employee names listed in the rows and the units listed in the columns. What I'm trying to do is create a formula that will pull a value in the lookup table that matches the employee/unit combo in columns A and B.
[TABLE="width: 271"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Employee1[/TD]
[TD]Unit1[/TD]
[TD]Value from table that matches criteria in column A and B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Employee1[/TD]
[TD]Unit2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Employee1[/TD]
[TD]Unit3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Employee1[/TD]
[TD]Unit4[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Employee2[/TD]
[TD]Unit10[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Employee2[/TD]
[TD]Unit11[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Employee3[/TD]
[TD]Unit5[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Employee3[/TD]
[TD]Unit6[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Employee3[/TD]
[TD]Unit7[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Employee3[/TD]
[TD]Unit8[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Employee3[/TD]
[TD]Unit9[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]Employee3[/TD]
[TD]Unit10[/TD]
[/TR]
</tbody>[/TABLE]
Lookup table:
[TABLE="width: 790"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]Unit1[/TD]
[TD]Unit2[/TD]
[TD]Unit3[/TD]
[TD]Unit4[/TD]
[TD]Unit5[/TD]
[TD]Unit6[/TD]
[TD]Unit7[/TD]
[TD]Unit8[/TD]
[TD]Unit9[/TD]
[TD]Unit10[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Employee1[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]10,000[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]10,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Employee2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5,000[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Employee3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]10,000[/TD]
[TD="align: right"]15,000[/TD]
[TD="align: right"]9,000[/TD]
[TD="align: right"]4,000[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Employee4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]6,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Employee5[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Employee6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Employee7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Employee8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]17,000[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Employee9[/TD]
[TD][/TD]
[TD="align: right"]4,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5,000[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Employee10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]15,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]Employee11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2,000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help is GREATLY appreciated!!
Thanks!