问题
I am trying to "match" values or patterns from one sheet to another. I got like "matrix scheme" (the first pic) where I am looking for a certain pattern which is labeled as " _ " and "1". If there is a match ("1"), I should color it in red, or green when no match (" _ "). But that part is easy. As you can see there are 4 "cases" for now, and that is exactly what I want to have on another sheet (the second pic) as match. But I am getting only one match (from Column S ("XC0")) and empty spaces (" _ ") for others even if there is a match.
Here is my match table (on picture beneath) where I used this function:
=VLOOKUP($A10;_0528_matrix[#All];MATCH(A$10;_0528_matrix[#Headers];0);0)
Index/Match also gave me the same results. These NA errors are fine for now, that's what I am gonna remove later.
Tried with this and still nothing...
=SUM(INDIRECT("_0528_matrix[" & A2 & "]"))
回答1:
It seems you need a count, not just a match. In this case, try putting this in the cell A3
:
=COUNTIF(INDIRECT("_0528_matrix[" & A2 & "]");"1")
Another version:
=COUNTIF(INDEX(Matrix;0;MATCH(A10;Matrix[#Headers];0));"1")
来源:https://stackoverflow.com/questions/60237971/excel-finding-the-right-match-from-matrix-scheme