Multiple IF's formula Help

Scott_T_27

New Member
Joined
Nov 22, 2018
Messages
7
Hi All

I'm wondering if someone can help please? I will have to explain sheet as I'm on work PC so unable to upload example spreadsheet.

I need a formula that will calculate/count how many holidays someone needs based on their shift pattern. Warehouse is open 7 days a week and workers are split between 4 different teams with different days off.

In column A I have the date, Columns B to E, teams 1 to 4. Which then states if that team is "IN" or "OFF" on that particular day.

All workers details are then logged on a separate tab.

On a further tab I then have a VLOOKUP that if I input the workers payroll into column A it will populate columns B and C with Shift (Days, Evenings, Nights) and Team (1-4) from workers details tab.
In cells D and E I have "Holiday Start" and "Holiday End" which will be populated manually based on the holiday request.
Then in cell F is where I need a formula to tell me how many "Days Off Required"
So I would like it to look at the date range on the other sheet and count the IN's if possible.

Hope all that makes sense.

Any and all help greatly appreciated, I just can't seem to make it work.

TIA

Scott T
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
That should be straightforward with a COUNTIFS formula but its not possible to help much further without much detail on your setup.
 
Upvote 0
This isnt clear to me at least:

In column A I have the date, Columns B to E, teams 1 to 4. Which then states if that team is "IN" or "OFF" on that particular day.

Is that a date for every day of the year in column A? Then each date has been populated with an IN or OFF for each team?

How does this:

the workers payroll

relate to the workers team? Cant see how you get to the team column from the payroll number.
 
Upvote 0
Sorry, yes column A has the date in for every day of the year. Then each days says either IN or OFF for each team.

On a separate sheet there is a full list of all workers with their payroll, shift, name, team, etc.

On a third sheet is when I want the results displayed. If I input the workers payroll it then populates shift and team cells using a VLOOKUP.

Hope that makes sense lol. I know it should be easy but looking at it so long and I can't figure it out.
 
Upvote 0
Ok copy and paste the following into A1:

DateShift1Shift2Shift3Shift4Date Start11/02/2019
01/02/2019ININININDate End16/02/2019
02/02/2019INININOFFShiftShift1
03/02/2019ININOFFOFFNo. Req2
04/02/2019INOFFOFFOFF
05/02/2019OFFOFFOFFOFF
06/02/2019OFFOFFOFFIN
07/02/2019OFFOFFININ
08/02/2019OFFINININ
09/02/2019ININININ
10/02/2019INININOFF
11/02/2019ININOFFOFF
12/02/2019INOFFOFFOFF
13/02/2019OFFOFFOFFOFF
14/02/2019OFFOFFOFFIN
15/02/2019OFFOFFININ
16/02/2019OFFINININ
17/02/2019ININININ
18/02/2019INININOFF
19/02/2019ININOFFOFF
20/02/2019INOFFOFFOFF
21/02/2019OFFOFFOFFOFF
22/02/2019OFFOFFOFFIN
23/02/2019OFFOFFININ
24/02/2019OFFINININ
25/02/2019ININININ
26/02/2019INININOFF
27/02/2019ININOFFOFF
28/02/2019INOFFOFFOFF

<colgroup><col><col span="6"><col></colgroup><tbody>
</tbody>

The formula in H4 is:

=COUNTIFS(A:A,">="&H1,A:A,"<="&H2,INDEX(B:E,,MATCH(H3,B1:E1,0)),"IN")
 
Upvote 0
You may have to change the dates to suit your locale. Im in UK so use date format DD/MM/YYYY
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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