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

At work we do a lot of surveys and have to analyse the
data. We use a survey package called Snap, which is good
for analysing statistics but not so good with analysing
or collating text answers to questions.

I was wondering if anyone could help me design an Excel
macro that could assist me in collating text answers.

Let's say I have a question "Which newspaper do you read
every day?" and there is a space for respondents to type
a reply. Assuming all the replies are typed correctly
(no spelling errors etc), the Snap software can dump out
all the responses into a file that can be read into
Excel, then sorted into alpha order, and it would look
something like this:

Daily Mail
Daily Mail
Daily Mail
Daily Mirror
Daily Mirror
Daily Star
Herald
Herald
Herald
Herald
Sun
Sun
Telegraph
Telegraph

.... and so on. Now what I eventually want is really a
table, or the figures to go into a table, that would look
like this:

Paper Responses Percentage

Daily Mail 8 10
Daily Mirror 6 8
Daily Star 10 14
Herald 4 5

etc etc.

What I am looking for is a macro that would go down a
column adding up the entries that are the same (eg all
the Mail's, all the Herald's, etc) and placing the tally
for each one in the column adjacent to the first one,
then deleting the extra ones. If it was also able to
calculate the percentage column too, that would be a
bonus.

If someone could get me started on this macro, or if it
is relatively simple, give me the text for the complete
macro, I would be most grateful.

Steve Wylie


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Counting rows

Steve,
When I was looking at a similar problem, a Google search turned up a macro
that I have amended for my use. Can't remember the exact location, but this
is the header that I retained.

*From: Iwer Mørck )
Subject: FREQUENCY?
Newsgroups: microsoft.public.excel.programming
Date: 1999/03/23*

Could be worth looking at.
Martin


Steve Wylie wrote in message ...
At work we do a lot of surveys and have to analyse the
data. We use a survey package called Snap, which is good
for analysing statistics but not so good with analysing
or collating text answers to questions.

I was wondering if anyone could help me design an Excel
macro that could assist me in collating text answers.

Let's say I have a question "Which newspaper do you read
every day?" and there is a space for respondents to type
a reply. Assuming all the replies are typed correctly
(no spelling errors etc), the Snap software can dump out
all the responses into a file that can be read into
Excel, then sorted into alpha order, and it would look
something like this:

<snip
What I am looking for is a macro that would go down a
column adding up the entries that are the same (eg all
the Mail's, all the Herald's, etc) and placing the tally
for each one in the column adjacent to the first one,
then deleting the extra ones. If it was also able to
calculate the percentage column too, that would be a
bonus.

If someone could get me started on this macro, or if it
is relatively simple, give me the text for the complete
macro, I would be most grateful.

Steve Wylie




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Counting rows

This does it with formulas. All you need to do is copy the list
of responses into column B and sort that column. Copy column
A and C formulas down to how ever many rows you need to match
the data in column B. Copy the rows in the other table down as
many rows as you need for the number of unique replies you get.

www.home.gen.nz/Excel/Survey.xls


Chrissy.

Steve Wylie wrote
At work we do a lot of surveys and have to analyse the
data. We use a survey package called Snap, which is good
for analysing statistics but not so good with analysing
or collating text answers to questions.

I was wondering if anyone could help me design an Excel
macro that could assist me in collating text answers.

Let's say I have a question "Which newspaper do you read
every day?" and there is a space for respondents to type
a reply. Assuming all the replies are typed correctly
(no spelling errors etc), the Snap software can dump out
all the responses into a file that can be read into
Excel, then sorted into alpha order, and it would look
something like this:

Daily Mail
Daily Mail
Daily Mail
Daily Mirror
Daily Mirror
Daily Star
Herald
Herald
Herald
Herald
Sun
Sun
Telegraph
Telegraph

... and so on. Now what I eventually want is really a
table, or the figures to go into a table, that would look
like this:

Paper Responses Percentage

Daily Mail 8 10
Daily Mirror 6 8
Daily Star 10 14
Herald 4 5

etc etc.

What I am looking for is a macro that would go down a
column adding up the entries that are the same (eg all
the Mail's, all the Herald's, etc) and placing the tally
for each one in the column adjacent to the first one,
then deleting the extra ones. If it was also able to
calculate the percentage column too, that would be a
bonus.

If someone could get me started on this macro, or if it
is relatively simple, give me the text for the complete
macro, I would be most grateful.

Steve Wylie




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Counting rows

Thank you for your prompt reply. I have located the
message you describe and will hang onto the macro content
in case it comes in useful in the future. However at the
moment I am having a go at the Formula solution described
by Chrissy in the other reply to my post, but thanks for
the pointer to the possible macro solution.

Steve

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
counting rows Darryl Excel Discussion (Misc queries) 2 January 29th 10 10:27 AM
Counting rows??? Lockedhart Excel Discussion (Misc queries) 6 July 30th 08 06:26 PM
Counting characters in multiple rows when rows meet specific criteria news.virginmedia.com Excel Worksheet Functions 3 June 28th 08 09:03 PM
Counting Rows CLamar Excel Discussion (Misc queries) 1 June 15th 06 04:05 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM


All times are GMT +1. The time now is 12:22 PM.

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"