=E4=BE=9D=E5=BA=A6=E6=9C=89=E5=A4=A7=E9=87=8F=E9=9B=BB=E8=85=A6=E9=81=8A=
=E6=88=B2

---------------------------------------------------------------------------=
-----
excel question

if i have this table (two col, several rows)

x 1
x 2
x 1
y 1
z 2
y 1
z 2

i want to display in matrix table in excel
x y z
1 2 2 2
2 1 2 1

how to write simple function to display above?
e=2Eg. 1 and x is totally display 2 times.