In Excel sheet, I have a list of IDs (let's call it L1) and another list (L2) longer than L1; each element of L1 are present in L2; I have a list of texts linked to L1 too.
I would like to write a function that returns:
- If a certain element of L2 is present in L1 display the text attached to L1;
- If a certain element of L2 is not present in L1, display a standard text like "Not present";
In other words, I have this situation:
| L1 | Text | L2 | Output |
|----|------|----|---------- |
| c1 |test1 | c1 | test1 |
| c2 |test2 | c2 | test2 |
| c5 |test5 | c3 |Not present|
| c7 |test7 | c4 |Not present|
| | | c5 | test5 |
| | | c6 |Not present|
| | | c7 | test7 |
How can I reach this output? The point not clear to me is how to get the text, in fact, the function I wrote (mockup) doesn't return those values; such function is:
=IFERROR(IF(MATCH(C6;$A$2:$A$5;0)>0;B6);"Not Present")
Thanks for your help!