Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Tallying columns

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tallying columns

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

"Riaz" wrote in message
...
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tallying Letters John Wright OCC Excel Worksheet Functions 2 December 6th 07 03:03 PM
Tallying feenster Excel Discussion (Misc queries) 2 November 28th 06 03:46 AM
Summing & Tallying-up Mike Excel Worksheet Functions 2 November 17th 06 07:10 PM
How do you use tallying in excel?? Katie_S Charts and Charting in Excel 1 March 23rd 05 12:59 AM
Tallying columns based on values of 2 different columns Mctabish Excel Worksheet Functions 1 January 30th 05 10:40 AM


All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"