lundi 18 décembre 2017

IF statement with multiple possible results and sources

I have a column of ID's in column B in my worksheet. Then I want to get the date in the column [Date] from either Table1 or Table2, if any of them is a match. If not, then I want to return a blank (""). The formula to execute this is in the next column (C1).

With my current formula, I only get results from Table1, then #N/A for the ID's that exist in Table2:

=IF(B1="";"";

IF(
(INDEX(Table1[DATE];MATCH(B1;Table1[IDENT];0)))<>"*";
INDEX(Table1[IDENT];MATCH(B1;Table1[IDENT];0));

IF((INDEX(Tabele2[DATE];MATCH(B1;Table2[IDENT];0)))<>"*";
INDEX(Table2[IDENT];MATCH(B1;Table2[IDENT];0));
"")))

Any tips?

Aucun commentaire:

Enregistrer un commentaire