Solved

counting values down a column

Posted on 2013-11-26
4
296 Views
Last Modified: 2013-11-30
I would like to count down a column, and count the number of different values

what is the best way to do this ?
0
Comment
Question by:MichaelGlancy
  • 2
4 Comments
 
LVL 23

Assisted Solution

by:NBVC
NBVC earned 400 total points
ID: 39678837
Are you trying to count unique values in a range?

eg

=SUMPRODUCT((A2:A100<>"")/COUNTIF(A2:A100,A2:A100&""))

should count unique values in range A2:A100

adjust ranges to suit.
0
 

Author Comment

by:MichaelGlancy
ID: 39678862
I have a list. (for simplicity I have a simple test list where I know what the result shoud roughly be)

1
1
1
2
2
2
2
3
3
3

Id like to end up with a result where all the instances of each value are counted so
1 - 3
2 - 4
3 - 3
0
 
LVL 23

Accepted Solution

by:
NBVC earned 400 total points
ID: 39678923
You can create a quick Pivot Table (i.e Insert|Pivot Table), make sure the column has a header first.  Then drag the header title to Row area, then drag it in the Summation area, then click on that and select from Value Field Setting: Count.

Alternatively select the column go to Data, Advanced from Sort & Filter section, then check Unique Values only.  Select Copy to Another location and select that location in the Copy to field.  Click Ok.  A unique listing should show up.  Then you can use COUNTIF to count

=Countif(A:A,H1)

WHERE column A contains the original list, and the unique list starts at H1.

Copy formula down.

Alternatively, manually list all the unique values, say starting in H1, and use the COUNTIF formula above....
0
 
LVL 4

Assisted Solution

by:andrew_man
andrew_man earned 100 total points
ID: 39681199
USE #1 FOR THE KEY

=IFERROR(INDEX($A$1:$A20,MATCH(0,INDEX(COUNTIF($C$1:C1,$A$1:$A$20),0,0),0)),"")

USE #2 FOR THE VALUE

=IF(C2<>"",COUNTIF($A$1:$A$20,C2),IF(C1<>"",SUM(OFFSET(D2,-ROW()+1,0,ROW()-1)),""))
Book1.xlsx
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel VBA 10 40
Excel User Form VBA Help 18 32
Excel calculate based on 'x' in column 2 25
Excel formula to display cell reference of named range 5 36
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question