Query to find occurences (lack of)

Vexorg

Board Regular
Joined
Oct 5, 2010
Messages
116
Hello Below is my sample table

<table bgcolor="#ffffff" border="1" cellspacing="0"><caption>Table1</caption> <thead> <tr> <th bgcolor="#c0c0c0">Name</th> <th bgcolor="#c0c0c0">Role</th> </tr> </thead> <tbody> <tr valign="TOP"> <td>BNP PARIBAS INVESTMENT PARTNERS SGR SPA</td> <td>Role</td> </tr> <tr valign="TOP"> <td>BNP PARIBAS INVESTMENT PARTNERS SGR SPA</td> <td>Senior Role</td> </tr> <tr valign="TOP"> <td>CCR ASSET MANAGEMENT
</td> <td>Audit</td> </tr> <tr valign="TOP"> <td>CCR ASSET MANAGEMENT</td> <td>Tax</td> </tr> <tr valign="TOP"> <td>DEXIA ASSET MANAGEMENT
</td> <td>Analyst</td> </tr> <tr valign="TOP"> <td>DEXIA ASSET MANAGEMENT</td> <td>Senior Role</td> </tr> <tr valign="TOP"> <td>EXANE DERIVATIVES</td> <td>Audit</td> </tr> <tr valign="TOP"> <td>EXANE DERIVATIVES</td> <td>Audit</td> </tr> <tr valign="TOP"> <td>FEDERAL FINANCE</td> <td>Analyst</td> </tr> <tr valign="TOP"> <td>FUNDLOGIC</td> <td>Senior Role</td> </tr> <tr valign="TOP"> <td>IKANO CAPITAL</td> <td>Senior Role</td> </tr> <tr valign="TOP"> <td>BARCLAY</td> <td>Tax</td> </tr> </tbody> <tfoot></tfoot> </table>

Hello, each Name should have 1 'Senior Role' i'm trying to find the names where 'Senior Role' never occurs. Each name should have a 'Senior Role'.

The answers should return:
CCR ASSET MANAGEMENT
EXANE DERIVATIVES
FEDERAL FINANCE
BARCLAY

I was thinking something like
Select name
from table1
where role not in 'senior role'

but that's not returning what i need..
 
You are missing a bracket, and have some parentheses in the wrong places:
Code:
SELECT REL.TN
FROM REL
GROUP BY REL.TN
HAVING Sum(IIf(([rel]![Functional Role]="COO") or ([rel]![Functional Role]="Authorized Signatory") or ([rel]![Functional Role]="Sr. Operations Manager") or ([rel]![Functional Role]="CLEAR Validation"),1,0))=0;
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

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