Counting the number of times a number has appeared in a column

oli35

New Member
Joined
Aug 29, 2014
Messages
6
Hi,

I want to find and count the number of times a given number has appeared in the same column, based on its position in the column. So if it's the first time it appeared in the column, I want to return 1, if it's the second time it appeared, I want to return 2, etc. I'm thinking of using the formula count, but how do I tell it to "count this number up to this point", since the range is conditional to the position of the number?

An image is worth a thousand words :

Screenshot%202014-08-29%2011.48.17.png






Thanks a lot
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Assuming your data begins in A1:

Code:
=COUNTIF($A$1:A1,A1)


I always feel so silly when I post the EXACT thing that the person above me posted. Darned not refreshing.
 
Upvote 0
I always feel so silly when I post the EXACT thing that the person above me posted. Darned not refreshing.

You can't do that, I've got trademarks and copyrights on that silly feeling, you're stealing my unintellectual property :p
 
Upvote 0
Well it says the formula is not correct, and it highlights the A1,A1 part. I tried changing the letters to the correct ones, it gives the same error.
 
Upvote 0
Great now it works, thanks misters. That's the one that worked in the end: =COUNTIF(A$1:A1,A1)
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

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