Query counting

uk

Board Regular
Joined
Nov 4, 2003
Messages
101
I have a number of different tables that represent different company divisions

Division A has ID number, Salary, age, car.

I need to create a query that counts people according to their pay band
and then be able to apply this query to different divisions.

I have created another table 'IncomeRange' that has 3 values, higher income, medium income, lower income. I want to use this table to query the different Company divions to give me a breakdown of how many people fall in which salary range.

eg.

Division A Table

ID Salary Age Car
001 13000 21
002 55000 45 BMW
003 23000 19 Honda
004 16000 25
005 18000 24 Mini
006 16000 18

IncomeRange Table
higher income medium income lower income
20000 15000 1000

The query should give me

number of ppl earning more then 20000, number of people greater then medium but less then higher. number of people earning low pay but less then medium.


High Medium Low
2 3 1

So by adjusting the vaules in the Income Rnage table I can get different results
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,221,586
Messages
6,160,646
Members
451,661
Latest member
hamdan17

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