row count

upcea

New Member
Joined
Mar 14, 2011
Messages
20
I am wondering if there is a way to count the number of rows I have with specific data.

For example:
A
A
A
A (next column it would read "4")
B
B (next column would read "2")
123
123
123
123
123
123 (next column would read "6")

etc. is there a way?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Assuming your data is sorted, is in column A and starts in A1, try this formula in B2 and copy down:
=IF(A2<>A3,COUNTIF($A$1:A2,A2),"")
 
Upvote 0
Maybe not exactly what you are looking for, but how about...

=COUNTIF($A$1:A1,A1) in B1 and drag down
 
Upvote 0
As long as the values in are grouped and there aren't any say, As outside the group of As, then the results should be right. Copy the formula inB23 down and it's important that the $ symbols are as they are:
Excel Workbook
AB
23A 
24a
25A
26A4
27B
28B2
29123
30123
31123
32123
33123
341236
Sheet
 
Upvote 0
these aren't working :(

what if i wanted this:


COLUMN A COLUMN B
A 4
A 4
A 4
A 4
B 2
B 2
123 6
123 6
123 6
123 6
123 6
123 6
 
Upvote 0
Give this a try in B1 and drag down:

=COUNTIF($A:$A,A1)

Your data does not need to be sorted for this to work.
 
Upvote 0
my excel has frozen up. excellent. thanks for all of the help! I'll try again in a bit.
 
Upvote 0
I hope I didn't do that to your Excel. This formula, =COUNTIF($A:$A,A1), looks at ALL of column A. You might want to change the range so the calculation is quicker.

An example would be this (change the 100 to meet your needs): =COUNTIF($A$1:$A$100,A1)
 
Upvote 0
Not to worry. I will try that tomorrow. It's a huge file so I've had other problems with it.

THanks for your help!
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top