Return value if unique value in cell has specific content in other columns for several rows

Tupelo1984

New Member
Joined
Jan 26, 2021
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Dear,

I am looking for a solution for counting and returning a specific value if a unique value from a column has tagged specific information to it in other columns.

Count column should show the result as in mini sheet below.

Rule:
Count if 'Code' (my unique value) has either "TestApp" and/or "Production" in App column with returning 1, and results of App (if one of these two apps are found), and 0 if none of these apps are found

sample.xlsx
ABC
1codeAppCount
2100TestApp1, Test App and Production
3100TestApp1, Test App and Production
4100Production1, Test App and Production
5200Production1, Production
6200Production1, Production
7200Production1, Production
8300TestApp1, Test App
9300Development1, Test App
10300Development1, Test App
11300Development1, Test App
12400Development0
13400Development0
sample


Thank you!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
How about
+Fluff 1.xlsm
ABC
1codeAppCount
2100TestApp1, TestApp and Production
3100TestApp1, TestApp and Production
4100Production1, TestApp and Production
5200Production1, Production
6200Production1, Production
7200Production1, Production
8300TestApp1, TestApp
9300Development1, TestApp
10300Development1, TestApp
11300Development1, TestApp
12400Development0
13400Development0
Master
Cell Formulas
RangeFormula
C2:C13C2=LET(Txt,TEXTJOIN(" and ",,UNIQUE(FILTER($B$2:$B$20,($A$2:$A$20=A2)*(($B$2:$B$20="TestApp")+($B$2:$B$20="Production")),""))),IF(LEN(Txt),"1, "&Txt,"0"))
 
Upvote 0
Hi Fluff, Thanks for your reply! I get the NAME? error - any idea what this can be caused by? Thank you!

sample.xlsx
ABC
1codeAppCount
2100TestApp#NAME?
3100TestApp1, Test App and Production
4100Production1, Test App and Production
5200Production1, Production
6200Production1, Production
7200Production1, Production
8300TestApp1, Test App
9300Development1, Test App
10300Development1, Test App
11300Development1, Test App
12400Development0
13400Development0
sample
Cell Formulas
RangeFormula
C2C2=LET(Txt,TEXTJOIN(" and ",,UNIQUE(FILTER($B$2:$B$20,($A$2:$A$20=A2)*(($B$2:$B$20="TestApp")+($B$2:$B$20="Production")),""))),IF(LEN(Txt),"1, "&Txt,"0"))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Ok, you may not have the LET function, so try
Excel Formula:
=IF(LEN(TEXTJOIN(" and ",,UNIQUE(FILTER($B$2:$B$20,($A$2:$A$20=A2)*(($B$2:$B$20="TestApp")+($B$2:$B$20="Production")),"")))),"1, "&TEXTJOIN(" and ",,UNIQUE(FILTER($B$2:$B$20,($A$2:$A$20=A2)*(($B$2:$B$20="TestApp")+($B$2:$B$20="Production")),""))),"0")
 
Upvote 0

Forum statistics

Threads
1,214,667
Messages
6,120,814
Members
448,990
Latest member
rohitsomani

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