Count if column A cell contains specific text, but the output has an error...

Status
Not open for further replies.

copperwasher

Board Regular
Joined
Mar 1, 2016
Messages
84
Office Version
  1. 365
Platform
  1. Windows
hi there.

This formula was designed for me, but it has an error, which needs a resolve or rewrite...

[I needed to count plus one, each time a specific company name appeared in Column A, calc the count in column B]

The provided formula
=MAP(SEQUENCE(COUNTA(A:A)-1)+1,LAMBDA(x,INDEX(A:A,x)&" "&COUNTIF(A2:INDEX(A:A,x),INDEX(A:A,x))+100))

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.

With sincere thanks
Gary
 

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
Status
Not open for further replies.

Forum statistics

Threads
1,215,237
Messages
6,123,800
Members
449,127
Latest member
Cyko

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