Forum Discussion
Match two values in two cells of a same row and return the value in a third cell
Hi There, I hope everyone fine there. I am at beginner level using Excel 2019 on MacBook Air.
I have come across a situation:
I have created a data base using Hierarchies. if value is selected in cell A1 and another value is selected in Cell B1. I want excel to compare these two values and return the value in C1.
For Example:
A1 = A
B1 = B
than C1 should be = C
- thanks for reply. you have picked up correctly. I used C just for example. it may be any value resulting from combination of A and B according to the data provided to excel.
sometime, it may be A and C in both cells, so excel should look for the resultant value from with in the provided data and return the value in C1.
10 Replies
- PeterBartholomew1Silver Contributor
The formula is always placed in the destination cell and sets the rules by which the value returned is to be calculated. A general method might be through the use of a 2D lookup table.
but IF formulas would also offer a solution in some cases.
- SergeiBaklanDiamond Contributor
Do you mean in C1 it shall be some formula which returns value based on values in A1 and B1 ? If so why "C" shall be returned, not "D" or "Z" ?
- Awais7376Copper Contributorthanks for reply. you have picked up correctly. I used C just for example. it may be any value resulting from combination of A and B according to the data provided to excel.
sometime, it may be A and C in both cells, so excel should look for the resultant value from with in the provided data and return the value in C1.- SergeiBaklanDiamond Contributor
Thank you, but I still don't catch what is the logic to generate " resulting from combination of A and B".
Let assume in A1 is 10 and in B1 is 11; or in A1 is "Joe" and in B1 is "Mary" - what shall be returned?