SOLVED

Running count of matching numbers (or text)

%3CLINGO-SUB%20id%3D%22lingo-sub-392087%22%20slang%3D%22en-US%22%3ERunning%20count%20of%20matching%20numbers%20(or%20text)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-392087%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%20I%20fear%20this%20may%20be%20a%20simple%20question%2C%20but%20I%20don't%20know%20how%20to%20phrase%20it%20correctly%20to%20find%20an%20answer.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20cannot%20figure%20out%20how%20to%20calculate%20a%20running%20count%20for%20a%20row%20of%20items%20that%20have%20duplicates.%20I've%20attached%20an%20example.%20I'm%20trying%20to%20calculate%20the%20highlighted%20row.%20I'm%20trying%20to%20get%20pivot%20tables%20to%20do%20it%20for%20me%2C%20but%20using%20the%20Running%20count%20function%20I%20just%20get%20a%20bunch%20of%201s.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20is%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-392087%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epivot%20table%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-392141%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20count%20of%20matching%20numbers%20(or%20text)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-392141%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3EThank%20you%2C%20that%20works%20great.%20Now%20I%20just%20have%20to%20study%20a%20little%20and%20figure%20out%20what%20it%20means...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-392140%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20count%20of%20matching%20numbers%20(or%20text)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-392140%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F311999%22%20target%3D%22_blank%22%3E%40Ian_4-learnin%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3DCOUNTIFS(B%243%3AB3%2CB3)%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-392115%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20count%20of%20matching%20numbers%20(or%20text)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-392115%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F311999%22%20target%3D%22_blank%22%3E%40Ian_4-learnin%3C%2FA%3E%20%2C%20that%20could%20be%20like%3C%2FP%3E%0A%3CPRE%3E%3D(N(D2)%2B1)*(%24B3%3D%24B2)%2B(%24B3%26lt%3B%26gt%3B%24B2)%3C%2FPRE%3E%0A%3CP%3EIt%20adds%201%20if%20the%20value%20in%20B%20is%20the%20same%20and%20returns%201%20otherwise%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello! I fear this may be a simple question, but I don't know how to phrase it correctly to find an answer.

 

I cannot figure out how to calculate a running count for a row of items that have duplicates. I've attached an example. I'm trying to calculate the highlighted row. I'm trying to get pivot tables to do it for me, but using the Running count function I just get a bunch of 1s.

 

Any help is appreciated!

3 Replies
Highlighted

@Ian_4-learnin , that could be like

=(N(D2)+1)*($B3=$B2)+($B3<>$B2)

It adds 1 if the value in B is the same and returns 1 otherwise

 

Highlighted
Best Response confirmed by Ian_4-learnin (Occasional Contributor)
Solution

@Ian_4-learnin 

 

=COUNTIFS(B$3:B3,B3)

 

Highlighted

@Sergei BaklanThank you, that works great. Now I just have to study a little and figure out what it means...