Tallying columns

  • Thread starter Thread starter Riaz
  • Start date Start date
R

Riaz

Hi,
I have a file with some data entries (that i dont care
about) but in Column L, I have a bunch of repetitive
numbers for each row, ranging from 1-19. I need to create
a dummy variable in new colums, like Dummy1... to Dummy19.
Whenever a particular number is occuring, 1 needs to be
assigned under the particular dummy, else 0 for all other
numbers.
For example (lets take 1-5):

L M N O P Q
IND Dummy1 Dummy2 Dummy3 Dummy4 Dummy5
3 0 0 1 0 0
3 0 0 1 0 0
4 0 0 0 1 0
5 0 0 0 0 1
5 0 0 0 0 1
5 0 0 0 0 1
1 1 0 0 0 0
1 1 0 0 0 0
2 0 1 0 0 0
2 0 1 0 0 0

If anyone could help me out with a program, that would be
very much appreciated. I cant do this manually because it
has more than 5000 rows! Thanks a lot!
 
In M2 put in

=if($L2=column()-12,1,0)

Then drag fill this to the right for a total of 19 columns. Then select
those 19 cells and drag fill down the column.

Should not take more than minute or two if you are really slow.

Regards,
Tom Ogilvy
 
Back
Top