Hello,
I need to find the row that matches the most number of parameters.
I have two datasheets. One table "Table23" with a set of rules that can contain a specific value or a *.
Table23:
In the second table I need to get values and match them against this table to find the truest match and return the value in the Value column.
I have made calculations on each of the row separately to get total matches =($G$2=Table23[@Id1])+($H$2=Table23[@Id2])+($I$2=Table23[@Id3])+($J$2=Table23[@Id4])
and a second calculation to get the true/false value: =AND(OR($G$2=Table23[@Id1];"X"=Table23[@Id1]);OR($H$2=Table23[@Id2];"X"=Table23[@Id2]);OR($I$2=Table23[@Id3];"X"=Table23[@Id3]);OR($J$2=Table23[@Id4];"X"=Table23[@Id4]))
These work perfectly, if i multiply them with eachother i get the desired result per row.
But I want to do this in an array but my logic seems off. The formula I am using is
=INDEX(Table23[Value];MATCH(
MAX(((G2=Table23[Id1])+(H2=Table23[Id2])+(I2=Table23[Id3])+(J2=Table23[Id4]))
*AND(OR(G2=Table23[Id1];"*"=Table23[Id1]);OR(H2=Table23[Id2];"*"=Table23[Id2]);OR(I2=Table23[Id3];"*"=Table23[Id3]);OR(J2=Table23[Id4];"*"=Table23[Id4])));
((G2=Table23[Id1])+(H2=Table23[Id2])+(I2=Table23[Id3])+(J2=Table23[Id4]))
*AND(OR(G2=Table23[Id1];"*"=Table23[Id1]);OR(H2=Table23[Id2];"*"=Table23[Id2]);OR(I2=Table23[Id3];"*"=Table23[Id3]);OR(J2=Table23[Id4];"*"=Table23[Id4]));0);0)
From my own troubleshooting it appears that the true/false statement isn't working per row.
Thankful for any help I could get on this.
Regards, Thomas
I need to find the row that matches the most number of parameters.
I have two datasheets. One table "Table23" with a set of rules that can contain a specific value or a *.
Table23:
In the second table I need to get values and match them against this table to find the truest match and return the value in the Value column.
I have made calculations on each of the row separately to get total matches =($G$2=Table23[@Id1])+($H$2=Table23[@Id2])+($I$2=Table23[@Id3])+($J$2=Table23[@Id4])
and a second calculation to get the true/false value: =AND(OR($G$2=Table23[@Id1];"X"=Table23[@Id1]);OR($H$2=Table23[@Id2];"X"=Table23[@Id2]);OR($I$2=Table23[@Id3];"X"=Table23[@Id3]);OR($J$2=Table23[@Id4];"X"=Table23[@Id4]))
These work perfectly, if i multiply them with eachother i get the desired result per row.
But I want to do this in an array but my logic seems off. The formula I am using is
=INDEX(Table23[Value];MATCH(
MAX(((G2=Table23[Id1])+(H2=Table23[Id2])+(I2=Table23[Id3])+(J2=Table23[Id4]))
*AND(OR(G2=Table23[Id1];"*"=Table23[Id1]);OR(H2=Table23[Id2];"*"=Table23[Id2]);OR(I2=Table23[Id3];"*"=Table23[Id3]);OR(J2=Table23[Id4];"*"=Table23[Id4])));
((G2=Table23[Id1])+(H2=Table23[Id2])+(I2=Table23[Id3])+(J2=Table23[Id4]))
*AND(OR(G2=Table23[Id1];"*"=Table23[Id1]);OR(H2=Table23[Id2];"*"=Table23[Id2]);OR(I2=Table23[Id3];"*"=Table23[Id3]);OR(J2=Table23[Id4];"*"=Table23[Id4]));0);0)
From my own troubleshooting it appears that the true/false statement isn't working per row.
Thankful for any help I could get on this.
Regards, Thomas