# linking data from one sheet to another

#### m17347047711116

##### New Member
Is there a way to have the Countif Function count only the values in a table that meet more than one set of criteria.
example i have a list where i count
Data= Employee Start Times
Criteria2= 15 time intervals
Criteria2= Only count values that work in a certain department.

Currently i have a master schedule for my employees. I enter the employees schedule for the week monday - Firday and all of their start and finish times. Then i sort the data by department. Now what i have on my screen is a table of aprox 300 employees and their start stop time arranged by department. I then block the desired department and copy it over to the department worksheet. The reason i do this is because i run a countif function to determine at every 15 minute interval how many employees are in the department so that i can schedule the correct amount of supervisors. it would be no trouble if the ratio of supervisors for each department was the same but the ratios are different for every department. This is why i copy the information to department worksheets.

I have done the following that works but it feels amature:
I created an auto filter on the main form
I then created a macro attached to a click button that is called update schedule.
Once the master schedule is entered i click the macro button and it does the following:
-----------------------------
Go to auto filter select department1 copy filtered results.

Go to department sheet paste results

Go to master schedule filter next department

Copy results paste to department sheet

Go to master schedule filter back to "All"

Stop Macro.
-------------------------
Can someone please give me some insight into a more proffessional way of manipulating this data.
I think there should be a way for my Countif Function to look at the master schedule and perform it's count on only values that meet the department criteria.

To make a short story long

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Replies
8
Views
852
Replies
1
Views
473
Replies
2
Views
495
Replies
0
Views
475
Replies
0
Views
255

1,219,035
Messages
6,145,902
Members
450,654
Latest member
lorento

### 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.

### Which adblocker are you using?

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

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