Imran Azam
Board Regular
- Joined
- Mar 15, 2011
- Messages
- 103
HI Guys
i have the data below
[TABLE="width: 274"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD]group [/TD]
[TD]ID[/TD]
[TD]Department[/TD]
[TD]products [/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]1[/TD]
[TD]sales [/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]2[/TD]
[TD]marketing[/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]3[/TD]
[TD]marketing[/TD]
[TD]ons[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]4[/TD]
[TD]HR[/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]5[/TD]
[TD]marketing[/TD]
[TD]tons[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]6[/TD]
[TD]marketing[/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]7[/TD]
[TD]sales [/TD]
[TD]pc[/TD]
[/TR]
</tbody>[/TABLE]
I want to do a count if , using this logic , count the ID where Group = A, department is not 'sales' and product is not 'tons' or 'ons' ( basically i want to exclude the product ons and tons in the count)
so the answer should be 3
can this be done?
thanks for any help
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 274"]
<tbody>[TR]
[TD]tons[/TD]
[/TR]
</tbody>[/TABLE]
</body>
i have the data below
[TABLE="width: 274"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD]group [/TD]
[TD]ID[/TD]
[TD]Department[/TD]
[TD]products [/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]1[/TD]
[TD]sales [/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]2[/TD]
[TD]marketing[/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]3[/TD]
[TD]marketing[/TD]
[TD]ons[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]4[/TD]
[TD]HR[/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]5[/TD]
[TD]marketing[/TD]
[TD]tons[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]6[/TD]
[TD]marketing[/TD]
[TD]pc[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]7[/TD]
[TD]sales [/TD]
[TD]pc[/TD]
[/TR]
</tbody>[/TABLE]
I want to do a count if , using this logic , count the ID where Group = A, department is not 'sales' and product is not 'tons' or 'ons' ( basically i want to exclude the product ons and tons in the count)
so the answer should be 3
can this be done?
thanks for any help
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 274"]
<tbody>[TR]
[TD]tons[/TD]
[/TR]
</tbody>[/TABLE]
</body>