Cell with 2 names in it causing error in formula

Gambit79

New Member
Joined
Dec 3, 2013
Messages
17
Hi
I have a master data spreadsheet that contains multiple columns including one with the name of a resource. generally most of the cells in this column contain only one name. however some of the cells contain 2 names for example "Joe Blogs / Jane Blogs". they all contain the same format.
on another sheet i have a formula that looks for the names in this column and then counts them based on multiple criteria. however that formula is skipping the cells that contain 2 names, which stuffs up the end result in terms of data accuracy.

is there a way in my formula to look for the name and still find it in the cells where there is 2 names? as I still want to count everytime "Joe Blogs" appears for example, and separately count all the Jane Blogs ones as well.

thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
on another sheet i have a formula that looks for the names in this column and then counts them based on multiple criteria.
Can you post that formula?

BTW, I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Hi Peter

the formula is:
=COUNTIFS(Table2[Solution CSM],[@Resource],Table2[Real Classification],'Formula ref sheet'!$B$4,Table2[Solution],'Formula ref sheet'!$C$11)+COUNTIFS(Table2[Solution CSM],[@Resource],Table2[Real Classification],'Formula ref sheet'!$B$4,Table2[Solution],'Formula ref sheet'!$C$8)

Some Notes:
  • Table2 = the master data spreadsheet
  • Solution CSM = the column that contains the names (sometimes has the two names)
  • @resource = the name I am trying to find in the formula
  • the other fields are more criteria to finish the count, those parts work without issue.
Version: Microsoft 365, Excel version 2008 (Build 13127.21668)
 
Upvote 0
Version: Microsoft 365
As I suggested before, put this in your account details then it is always available to helpers. Otherwise you would need to re-write this every time you ask a question. :)

1626346926551.png


See if this formula does what you want.
Excel Formula:
=IFNA(ROWS(FILTER(Table2[Solution CSM],(ISNUMBER(SEARCH("/"&[@Resource]&"/","/"&Table2[Solution CSM]&"/")))*(Table2[Real Classification]='Formula ref sheet'!$B$4)*((Table2[Solution]='Formula ref sheet'!$C$11)+(Table2[Solution]='Formula ref sheet'!$C$8)),NA())),0)
 
Upvote 0
thanks Peter
I have gone into my profile to see where I can add those details, can't see a section to edit though and add them. would you know where I do it?

also is the formula an Array formula? i put it into the sheet just as a copy and paste and it returned a result on my test subject of 0 when the result should be 5
 
Upvote 0
When you enter your profile ,select Account Details, then about halfway down the page !
 
Upvote 0
I have gone into my profile to see where I can add those details, can't see a section to edit though and add them.
Just confirming what Michael said. Look here

1626400882617.png



also is the formula an Array formula? i put it into the sheet just as a copy and paste and it returned a result on my test subject of 0 when the result should be 5
With Excel 365 there should be no need to enter as an array formula as all formulas are treated as if they are. Perhaps we nee to see a simple set of sample data.

Here is mine.
Gambit79.xlsm
ABC
4a
5
6
7
8c
9
10
11b
Formula ref sheet


Gambit79.xlsm
ABCDEFGH
1
2Solution CSMReal ClassificationSolutionResourceFrmla2
3Res1/Res2abRes12
4Res2abRes25
5Res3addRes33
6Res1/Res3addRes40
7Res2abRes50
8Res3/Res2ab
9Res1xxc
10Res2ac
11Res3ac
12Res1ab
13Res2xxb
14Res3ab
15
Sheet1
Cell Formulas
RangeFormula
H3:H7H3=IFNA(ROWS(FILTER(Table2[Solution CSM],(ISNUMBER(SEARCH("/"&[@Resource]&"/","/"&Table2[Solution CSM]&"/")))*(Table2[Real Classification]='Formula ref sheet'!$B$4)*((Table2[Solution]='Formula ref sheet'!$C$11)+(Table2[Solution]='Formula ref sheet'!$C$8)),NA())),0)


In the right hand table, the count of 2 for Res1 comes from the left table rows 3 and 12
The count of 5 for Res2 comes from rows 3, 4, 7, 8 & 10
The count of 3 for Res3 comes from rows 8, 11 & 14

Have I misunderstood your requirement?
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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