COUNTIF+INDEX+MATCH formula

MZING81

Board Regular
Joined
Mar 20, 2012
Messages
74
I seemed to hit a wall. I cannot for life of me figure out how to properly combine an countif, index/match all together. I have 4 criteria one of which is a header. Ultimately I'm trying to find out how many employees for a specific location on specific date, shift are going to be where. Below is the original formula not necessarily for the dummy sheet below.

=SUMPRODUCT(--(final!$G$9:$G$1200&final!$K$9:$K$1200=$G$5&H5),INDEX(final!$AA$8:$AG$1200,,MATCH(H4&G6,final!$AA$8:$AG$8&$AA$9:$AG$1200,0)))

I also tried

=SUMIF(final!$BC$9:$BC$1200,$G$5&H5,INDEX(final!$AA$9:$AG$1200,,MATCH(H4&G6,final!$AA$8:$AG$8&final!$AA$9:$AG$1200,0)))

and
=COUNTIF(INDEX(final!$AA$9:$AG$1300,0,MATCH(H$5,final!$K$9:$K$1300,0)),$G8)-COUNTIF(INDEX(final!$AA$9:$AG$1300,0,MATCH(H$4,final!$AA$8:$AG$8,0)),$G8)

But nothing seemed to work properly.

Any help is greatly appreciated. I apologize if this is a remotely similar to something I posted a while ago but got no responses.
DATESUNDAYMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY
EMPLOYEE 1AM1/2/2017KIOS-4KIOS-4STORE-5STORE-5KIOS-4
EMPLOYEE 2AM1/3/2017 KIOS-1KIOS-1STORE-1STORE-1
EMPLOYEE 3AM1/4/2017 STORE-1STORE-1STORE-1STORE-1STORE-1
EMPLOYEE 4AM1/5/2017STORE-1STORE-1STORE-1 STORE-1STORE-1
EMPLOYEE 5PM1/6/2017 STORE-0 STORE-0STORE-0STORE-0
EMPLOYEE 6PM1/7/2017KIOS-1STORE-1 STORE-1KIOS-1KIOS-1
EMPLOYEE 7PM1/2/2017 STORE-2 STORE-2 STORE-2
EMPLOYEE 8AM1/3/2017 STORE-3STORE-3STORE-3STORE-3STORE-3
EMPLOYEE 9AM1/4/2017 STORE-5KIOS-5KIOS-4STORE-5OFFSITE
EMPLOYEE 10AM1/5/2017STORE-5STORE-5 STORE-5STORE-5STORE-5
EMPLOYEE 11PM1/6/2017 STORE-1STORE-1STORE-1STORE-1STORE-1
EMPLOYEE 12PM1/7/2017STORE-2STORE-2 STORE-2STORE-2STORE-2
EMPLOYEE 13PM1/2/2017KIOS-1STORE-2KIOS-1KIOS-1OFFSITE
EMPLOYEE 14AM1/3/2017OFFSITEOFFSITESTORE-2 KIOS-1
EMPLOYEE 15AM1/4/2017KIOS-1OFFSITE STORE-2KIOS-1KIOS-1
EMPLOYEE 16AM1/5/2017 WAREHOUSEWAREHOUSEWAREHOUSESTORE-1
EMPLOYEE 17AM1/6/2017WAREHOUSEWAREHOUSESTORE-5WAREHOUSEWAREHOUSE
EMPLOYEE 18PM1/7/2017KIOS-1KIOS-1KIOS-1KIOS-1 STORE-1
EMPLOYEE 19PM1/2/2017KIOS-1KIOS-1 KIOS-1KIOS-1
EMPLOYEE 20PM1/3/2017 KIOS-1STORE-2KIOS-1STORE-2KIOS-1
EMPLOYEE 21AM1/4/2017STORE-1STORE-1STORE-1STORE-1STORE-1
EMPLOYEE 22AM1/5/2017STORE-1STORE-1STORE-1STORE-1STORE-1
EMPLOYEE 23PM1/6/2017 STORE-1STORE-1STORE-1STORE-1STORE-1
EMPLOYEE 24PM1/7/2017 STORE-0KIOS-4KIOS-4STORE-0STORE-0
EMPLOYEE 25AM1/2/2017STORE-5STORE-5 STORE-5STORE-5STORE-5
<colgroup><col width="132" style="width: 99pt; mso-width-source: userset; mso-width-alt: 4827;"> <col width="109" style="width: 82pt; mso-width-source: userset; mso-width-alt: 3986;"> <col width="131" style="width: 98pt; mso-width-source: userset; mso-width-alt: 4790;"> <col width="109" style="width: 82pt; mso-width-source: userset; mso-width-alt: 3986;" span="7"> <tbody> </tbody>

This is where I would like to fill the data
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
AM1/2/20171/3/20171/4/20171/5/20171/6/20171/7/20171/8/2017
STORE-1 ??
STORE-2
STORE-3
WAREHOUSE
KIOS-1
<colgroup><col width="109" style="width: 82pt; mso-width-source: userset; mso-width-alt: 3986;"> <col width="131" style="width: 98pt; mso-width-source: userset; mso-width-alt: 4790;"> <col width="109" style="width: 82pt; mso-width-source: userset; mso-width-alt: 3986;" span="6"> <tbody> </tbody>

Thanks
Mzing81
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,339
Messages
6,124,370
Members
449,155
Latest member
ravioli44

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