easy access question

andrew29

Board Regular
Joined
Jun 1, 2003
Messages
75
Hi everyone,

I have a single table that contains customer numbers, and account types in a format simialar to below.

0001 accountA
0001 accountB
0001 accountC
0001 accountD
0002 accountB
0003 accountD
0004 accountF
0005 accountA
0005 accountB
0005 accountF

Now what I need to do is

find out how many individual customers have accountA only without having accountB and AccountC.

find out ahow many individual customers have both accountA and accountB but no accountC.

Find out how many individual customers have accountA, AccountB and AccountC.

I've added the one table 3 times and the query returns what I want except for the fact that it doesn't return unique records. It returns something like.

0001 AccountA AccountB AccountC
0001 AccountA AccountB AccountC
0001 AccountA AccountB AccountC

In this instance I want it to return just unique customer numbers.

I've added the 'total' row to the query but it doesn't work when I have a query that is select customer number, and account type where AccountA but not accountB or AccountC.

The problem seems to be with adding the not (<>) clause. I can get it to work without that.

Can anyone help?

I'm sure its easy.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Are there too many Account types to make each type a separate field. It would be easy to make a search form that way.

Might help
 
Upvote 0
Can you post the SQL for the existing query?

Are you only using 1 query?
 
Upvote 0

Forum statistics

Threads
1,221,899
Messages
6,162,686
Members
451,782
Latest member
LizN

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