A1: apple
A2: apple
A3: orange
A4: apple
A5: grape
A6: orange
A7: grape
apple 3
orange 2
grape 2
how can i achieve such result?
A1: apple
A2: apple
A3: orange
A4: apple
A5: grape
A6: orange
A7: grape
apple 3
orange 2
grape 2
how can i achieve such result?
Last edited by okl; 05-08-2009 at 11:19 PM.
Hello Okl,
What version of Excel are you using? And are you required to use VBA code (programming), or will worksheet functions suffice?
excel 2003, function will do.
thanks
Ok, good.
1. Select your data in column A (you may want a header in A1, like "Fruit Type")
2. Click Data -> Filter -> Advanced Filter
3. Select 'Copy to another location' and next to 'Copy To', type in or select another cell (like B1)
4. Check the box for 'Unique Values Only'
5. Click OK
That will create a list of unique values from column A, starting in B1. To get the counts of each, you can then use a formula in C2 such as:
=COUNTIF($A:$A,B2)
Finally, double-click the lower right corner of C2 and the formula will automatically fill itself down to the last unique value in column B.
Hope that helps!
solved, thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks