> --------------------------------------------------------------------------------
> excel question
[quoted text clipped - 16 lines]
> how to write simple function to display above?
> e.g. 1 and x is totally display 2 times.
Hi,
If you set up your matrix in say C1 so that D1=X, E1=Y and F1=Z and
C2=1 and C3 = 2.
Asuming your data is in A1:B7 then you could use SumProduct().
=SUMPRODUCT(--($A$1:$A$7=D1),--($B$1:$B$7=$C$2))
Place the formula in D2 and copy out along the row. Careful with the
cell referencing.
Regards,
Bondi