Simple Excel Function

Spooner

Lifer
Jan 16, 2000
12,025
1
76
If I have a column with a bunch of cells that contain various text data and I want to get a count of how many of each there are, what function do I use?

Example:

A1........................A2
Beach...................Beach 3
Beach...................Car 2
Car.......................Banana 2
Banana
Beach
Banana
Car
 

isasir

Diamond Member
Aug 8, 2000
8,609
0
0
I don't get what you mean. A1:A300 can vary depending on how many rows column A takes up. "Beach" was used since it was one of your choices. Do you not know what are the potential items that'll be listed in column A?
 

Spooner

Lifer
Jan 16, 2000
12,025
1
76
Do you not know what are the potential items that'll be listed in column A?
Exactly. I'd like excel to look down the column, and provide a count of how many different items there are without me specifying what exactly it's counting. does that make sense?
 

Turkish

Lifer
May 26, 2003
15,547
1
81
if you know a little programming, you can do that through VBA.
View > toolbars > visual basic.
i dont have time right now but search for lookup functions.
 

isasir

Diamond Member
Aug 8, 2000
8,609
0
0
Originally posted by: Spooner
Do you not know what are the potential items that'll be listed in column A?
Exactly. I'd like excel to look down the column, and provide a count of how many different items there are without me specifying what exactly it's counting. does that make sense?

Makes sense, but I don't think I can help you out with that. I guess someone with VB knowledge can though.
 

robphelan

Diamond Member
Aug 28, 2003
4,084
17
81
Originally posted by: Spooner
Do you not know what are the potential items that'll be listed in column A?
Exactly. I'd like excel to look down the column, and provide a count of how many different items there are without me specifying what exactly it's counting. does that make sense?

you need to get Unique records. Do this by:
1) sort the column,
2) select the entire column by clicking on the column header.
3) Click Data -> Filter -> Advanced Filter
4) choose 'Copy to another location'
5) Check 'Unique Records Only'
6) in the 'Copy To' Box, type in $D1 (or wherever you want to place your unique records)
7) click OK

that should do it.
 

z0mb13

Lifer
May 19, 2002
18,106
1
76
use countif

countif(range to check, "beach")

not so sure about the syntax.. go look up excel help
 

cronos

Diamond Member
Nov 7, 2001
9,380
26
101
or you can import to Access and do a:
select a1, count(a1) group by a1;
or something like that
 

isasir

Diamond Member
Aug 8, 2000
8,609
0
0
Originally posted by: robphelan
Originally posted by: Spooner
Do you not know what are the potential items that'll be listed in column A?
Exactly. I'd like excel to look down the column, and provide a count of how many different items there are without me specifying what exactly it's counting. does that make sense?

you need to get Unique records. Do this by:
1) sort the column,
2) select the entire column by clicking on the column header.
3) Click Data -> Filter -> Advanced Filter
4) choose 'Copy to another location'
5) Check 'Unique Records Only'
6) in the 'Copy To' Box, type in $D1 (or wherever you want to place your unique records)
7) click OK

that should do it.

Hmm, I guess you'd still need to combine this with a countif to get a count of each item, but at least now you'd know the various items in the column?
 

z0mb13

Lifer
May 19, 2002
18,106
1
76
countif is the answer!!! it is very easy to use! just do multiple countifs for each item u want to check
 

Turkish

Lifer
May 26, 2003
15,547
1
81
i am trying to find somethign on google for you... if you really need to this and are in a hurry, i suggest Experts-Exchange.com.
 

Spooner

Lifer
Jan 16, 2000
12,025
1
76
i took rob's example and did the unique values in a new column, then simply looked at the cell number for a quick count!!!!

Thanks all!!!
 

NeoV

Diamond Member
Apr 18, 2000
9,504
2
81
I have a few alternatives....

A pivot table would actually be the best way to summarize everything, but if you don't know how to use that I'll leave that one alone...

you can figure out the bottom row of each column, assuming each row has something in it until the end, with =65536 - countif(a1:a65536,"")