How to arrange table data differently by using if, match, and index?

℡╲_俬逩灬. 提交于 2020-01-06 21:05:48

问题


As shown in the attached image, I need to convert A2:D10 to the format of A12:E17. The 4 tables from F1 to AB12 are my experiments using if, match, and index. Same formula gets different results and it seems to be dependent on the row position of the tables. In My previous question, I was trying to pinpoint the problem to the if function.

What am I doing wrong here?

Thanks, Lu

enter image description here


回答1:


Again, as I said in your last question: The formula has not been array entered. Array formulas need to be confirmed with Ctrl-Shift-Enter.

Without that, the first array in the IF statement does not get resolved and the Match does not return the correct result.

Make use of the Evaluate Formula tool and step through the formula.

The merged cells don't help with the cell referencing. Unmerge the cells and fill in all the labels in row 1, then use this slightly amended formula and confirm it with Ctrl-Shift-Enter. Then copy across and down.




回答2:


I hope that I get the English names of the functions right:

In D14 and following cells:

=INDEX($C$1:$C$5;MATCH(1;MMULT(($B$3:$B$10=$A14)*($A$3:$A$10=B$13);1);0))

The MATCH function tells which value (by number counted from the top) matches both conditions. The INDEX function returns this value from C1:C5.



来源:https://stackoverflow.com/questions/38489893/how-to-arrange-table-data-differently-by-using-if-match-and-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!