INDEX MATCH

aek_nikos

New Member
Joined
Jan 12, 2023
Messages
14
Office Version
  1. 2016
Platform
  1. Windows
Good afternoon,

I am just trying to write an if statement for a be careful warning, when an employee has LESS than 11 hours of rest between 2 days but it seems much more difficult than i thought:

The first two rows are the days and the codes of the daily programms of the employers. (71 is 7:00-15:00 and 1132 is 15:00-23:00). In this example 71 cannot be followed by 1132 because there are not 11 hours of rest. I've done this:
Excel Formula:
=IF(ISNUMBER(INDEX($G$67:$K$93;MATCH(E4;$G$67:$G$93;0);5));(INDEX($G$67:$K$93;MATCH(E4;$G$67:$G$93;0);5)+"11:00");(INDEX($G$67:$K$93;MATCH(E4;$G$67:$G$93;0);3)+"11:00"))
i've used this to add 11 hours to the "yesterday's" programm so i get what's the time allowed for the employer to come to work.

Excel Formula:
=INDEX($G$67:$K$93;MATCH(F4;$G$67:$G$93;0);2)
I've used this to get the time the employers comes to work

Rich (BB code):
=NUMBERVALUE(IF(AO4>AW4;24+(AW4-AO4);AO4-AW4))
and i"ve used this just to get the difference

BUT i think the whole approach is wrong, any ideas?
 

Attachments

  • Καταγραφή.PNG
    Καταγραφή.PNG
    16 KB · Views: 9

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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