Query Count When Another Field Value Is Equal to Given Variable

geospatial

Active Member
Joined
Sep 2, 2008
Messages
290
I am trying to run a query where I have 4 columns.

Column 1: Key Number (List of Unique Key Numbers)
Column 2: Keys Signed Out (Keys are said to be signed out if they employeeFirstName Is Not Equal to Extra Key)
Column 3: Keys In Inventory (Keys are in inventory if employeeFirstName is Equal to Extra Key)
Column 4: Total Key Count (Adding the row from Column 2 and Column 3

Ive used column criteria before, but that was when specifically wanting to filter by data in the one particular column you are setting criteria on. I am not sure how I would set criteria to only count the number of Keys that are set to a given name in another field. Any thoughts?
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
6,178
Office Version
  1. 365
Platform
  1. Windows
Providing sample data: Before and After scenarios will help significantly. Use the XL2BB function.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,102
Messages
5,628,700
Members
416,333
Latest member
Time2Learn

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
Top