Add to the count if the cell contains a specific name...

copperwasher

Board Regular
Joined
Mar 1, 2016
Messages
84
Office Version
  1. 365
Platform
  1. Windows
Hello Excel Gurus,

Over the past couple of hours, I have made some feeble attempts at this.

I need to display a rolling count (column 2), but the count is relative to a specific name (column 1).

Column 1 is typed.
Column 2 is the desired output.

Column 1, will grow in length, as more data is added, so column 2 needs to be able to copy down also

COMPANY NAME (column 1)COMPANY NAME and COUNT (Column 2)
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
company Ccompany C 102
company Bcompany B 102
company Acompany A 104
company Acompany A 105


Any assistance is very much appreciated,

My regards
Gary
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Something like:

=A2&" "&COUNTIF(A$2:A2,A2)+100

perhaps?
 
Upvote 0
Book1
AB
1NameCount
2company Bcompany B 101
3company Acompany A 101
4company Acompany A 102
5company Acompany A 103
6company Ccompany C 101
7company Ccompany C 102
8company Bcompany B 102
9company Acompany A 104
10company Acompany A 105
Sheet7
Cell Formulas
RangeFormula
B2:B10B2=MAP(SEQUENCE(COUNTA(A:A)-1)+1,LAMBDA(x,INDEX(A:A,x)&" "&COUNTIF(A2:INDEX(A:A,x),INDEX(A:A,x))+100))
Dynamic array formulas.
 
Upvote 0
Book1
AB
1NameCount
2company Bcompany B 101
3company Acompany A 101
4company Acompany A 102
5company Acompany A 103
6company Ccompany C 101
7company Ccompany C 102
8company Bcompany B 102
9company Acompany A 104
10company Acompany A 105
Sheet7
Cell Formulas
RangeFormula
B2:B10B2=MAP(SEQUENCE(COUNTA(A:A)-1)+1,LAMBDA(x,INDEX(A:A,x)&" "&COUNTIF(A2:INDEX(A:A,x),INDEX(A:A,x))+100))
Dynamic array formulas.
That works perfectly JvdV, and well beyond my current comprehension of excel...

5 stars *****
 
Upvote 0
That works perfectly JvdV, and well beyond my current comprehension of excel...

5 stars *****
Ah....
Sorry about this JvdV,

What if column A has a blank cell, column B cell = 100

Is there a way to keep column B cell blank if the adjacent column A cell is blank ??

COMPANY NAME (column 1)COMPANY NAME and COUNT (Column 2)
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
company Bcompany B 102

Any guidance is much appreciated.

Btw, I've started to pick through your equation, to understand its methodology, it is certainly pushing my learning curve....
 
Upvote 0
Oh.... there seems to be a spill error when I extend the equation beyond row 15

NameCount
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
company Ccompany C 102
company Bcompany B 102
company Acompany A 104
company Acompany A 105
company Acompany A 106
company Acompany A 107
company Acompany A 108
company Acompany A 109
100
100
100


Adding at row 15, this happens
NameCount
company B
#SPILL!​
company A
company A
company A
company C
company C
company B
company A
company A
company A
company A
company A
company A
company B
 
Upvote 0
Oh.... there seems to be a spill error when I extend the equation beyond row 15

NameCount
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
company Ccompany C 102
company Bcompany B 102
company Acompany A 104
company Acompany A 105
company Acompany A 106
company Acompany A 107
company Acompany A 108
company Acompany A 109
100
100
100


Adding at row 15, this happens
NameCount
company B
#SPILL!​
company A
company A
company A
company C
company C
company B
company A
company A
company A
company A
company A
company A
company B
Solved.... my copy down error....

But the blank column error remains, if it can be resolved....
 
Last edited:
Upvote 0
The spill error means there are values in the way of the to be spilled answers. One of these cells in column B isn't actually empty.
 
Upvote 0
The spill error means there are values in the way of the to be spilled answers. One of these cells in column B isn't actually empty.
And how do I use this formula, if column A has blank cells??

When there are blank cells in Column A, column B cell produces 100, this needs to be blank

Currently, column A cell is blank,
Column B cell is 100
NameCount
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
100
company Bcompany B 102
company Acompany A 104
company Acompany A 105


Ideally
Column A cell is blank, Column B cell is blank

NameCount
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
company Bcompany B 102
company Acompany A 104
company Acompany A 105

Any guidance is very much appreciated
 
Upvote 0
Solved.... my copy down error....

But the blank column error remains, if it can be resolved....
Hi JvdV

Sorry to ask again...

Column A cells can blank, so the column B cell = 100
NameCount
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
100
company Bcompany B 102
company Acompany A 104
company Acompany A 105


Is there a way that if column A is blank, the relative cell in column B is also blank ?
NameCount
company Bcompany B 101
company Acompany A 101
company Acompany A 102
company Acompany A 103
company Ccompany C 101
100
company Bcompany B 102
company Acompany A 104
company Acompany A 105

Your help is very much appreciated...
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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