Reputation: 3803
Hello guys I was trying to achieve the following in Excel
A B C D E
1 1 0 0 0
0 0 0 0 0
2 0 1 0 0
1 2 0 0 0
2 0 2 0 0
So if I enter a number in A column the corresponding column to that number counts how many times the number occurred in A and outputs the same in the same row at the corresponding column. I ve tried B = COUNTIF(A1:A1000, 1)
but this is useless if you know what I mean. Any ideas on how to achieve the result?
Upvotes: 1
Views: 119
Reputation: 46451
Try this formula in B1 copied down and across
=IF($A1=COLUMNS($B1:B1),COUNTIF($A$1:$A1,COLUMNS($B1:B1)),0)
That will give the results you showed
Upvotes: 2