[Solved] Combine a VLOOKUP with a COUNTIF function
Posted: Wed Jul 15, 2015 6:46 pm
I have a staff scheduling spreadsheet that I want to have a sub total of staff on, within a range of shifts and within a department query.
I tried using COUNTIF() to to total a few shift choices within a range, but only if the query selection matches the cell three columns to the left.
The issue cells are B4:J5
This gives me the total matches:
=COUNTIF(D$7:D$52;$L$72)+COUNTIF(D$7:D$52;$L$73)+COUNTIF(D$7:D$52;$L$74)
But I need it to only do the COUNTIF() on the cells that match the VLOOKUP()
=VLOOKUP($A$2;$A$14:$J$66;4;0)
So if you select "ACOUSTIC GUITARS" it will count how many "DAY SHIFT" staff are on.
How do I get it to have a multiple criteria sort for a function instead of just a permission switch to count the entire column?
I tried using COUNTIF() to to total a few shift choices within a range, but only if the query selection matches the cell three columns to the left.
The issue cells are B4:J5
This gives me the total matches:
=COUNTIF(D$7:D$52;$L$72)+COUNTIF(D$7:D$52;$L$73)+COUNTIF(D$7:D$52;$L$74)
But I need it to only do the COUNTIF() on the cells that match the VLOOKUP()
=VLOOKUP($A$2;$A$14:$J$66;4;0)
So if you select "ACOUSTIC GUITARS" it will count how many "DAY SHIFT" staff are on.
How do I get it to have a multiple criteria sort for a function instead of just a permission switch to count the entire column?