Suppose I have a column with recurring entries and I want to dynamically count the number of times the entry is present, what is the best way to do it?
For example, if I have John in A2, A5 and A7, B2,B5 and B7 should read 1,2 and 3 respectively.
Suppose I have a column with recurring entries and I want to dynamically count the number of times the entry is present, what is the best way to do it?
For example, if I have John in A2, A5 and A7, B2,B5 and B7 should read 1,2 and 3 respectively.
Do you only want to count when they appear together on the same row like this:
Excel 2016 (Windows) 32 bit
A B C 1 2John John 1 3 4 5John John 2 6 7John John 3
Sheet: Sheet1
Or something else?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
A B 1 Name Count 2 John =COUNTIF($A$2:$A2,$A2) 3 Andy =COUNTIF($A$2:$A3,$A3) 4 Bill =COUNTIF($A$2:$A4,$A4) 5 John =COUNTIF($A$2:$A5,$A5) 6 Charlie =COUNTIF($A$2:$A6,$A6) 7 John =COUNTIF($A$2:$A7,$A7)
Which gives:
A B 1 Name Count 2 John 1 3 Andy 1 4 Bill 1 5 John 2 6 Charlie 1 7 John 3
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
Try
Assuming data starts in A2 and column A is list of names
=COUNTIF($A$2:A2,A2)
This will increment count for a given name each time it is matched.
Try this:
Excel 2016 (Windows) 32 bit
A B C 1 2John John 1 3 4 5John John 2 6 7John John 3
Sheet: Sheet1
Excel 2016 (Windows) 32 bit
C 1=IF(A1<>B1,"",IF(COUNTIFS(A$1:A1,A1,B$1:B1,B1)=0,"",COUNTIFS(A$1:A1,A1,B$1:B1,B1)))
Sheet: Sheet1
Thank you for your responses! All of them work fine.
I figured out my folly. I'm using my excel in English on a German PC.
Needed to use the semi colon instead of the comma in the formulas!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks