Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count top 3 text values in column

Status
Not open for further replies.

greyoxide

Technical User
Jun 28, 2012
14
US
I have a spreadsheet which contains survey results. I need to use excel to tally the results from each column and tell me the which text value occurs the most in each column.

Can this be done in excel?
 
hi,

You could use the COUNTIF() or COUNTIFS() function.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
You could also use a PivotTable with the Top10 feature.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
@Skip thanks for your quick reply. It looks like COUNTIF is what I should use, but there is a problem, it looks like the COUNTIF function uses a specific criteria to count, but I need it to count dynamically. Is this possible?
 
Yes, a function takes a particular argument. That is why I also suggested a PivotTable solution.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
you could use the RANK() function to establish the frequency of the values in the population.
 
I actually ran a test, where my PivotTable Top10(3) is just above the column of values. Whenever the frequency of values change the result is immediately reflected in the PivotTable above the column.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip, is this because you've put the pivot table on the same worksheet as the data? When I make a pivot-table using "insert - pivot table" in Excel2007, and accept the default of making the pivot table in a new worksheet, I can set its filter to show the top 3, and order by count, and it displays correctly, but if I add more data to the original worksheet, the pivot table doesn't reflect the changes until I do a "refresh" on it. I'd still, absolutely, go with the pivot-table approach on this, and thanks for the tip about Top10, I hadn't noticed this filter before.
 
The refresh can be made to be 'automatic' but using a few lines of VBA code, if you care to pursue in formu707.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top