TimvMechelen
Board Regular
- Joined
- Nov 7, 2016
- Messages
- 121
Hi All,
The situation that I have is the following:
Sheet1: (start and end times of orders)
Sheet2: (given downtimes)
The array formula I have right now is the following:
{=INDEX(SHEET1!$E$2:$E$16921,SMALL(IF((SHEET1!$P$2:$P$16921<=$B2)*(SHEET1!$Q$2:$Q$16921>=$C2),ROW(SHEET1!$P$2:$P$16921)-ROW(SHEET1!$P$2)+1,"");1))}
( DUTCH formula: {=INDEX(Blad1!$E$2:$E$16921;KLEINSTE(ALS((Blad1!$P$2:$P$16921<=$B2)*(Blad1!$Q$2:$Q$16921>=$C2);RIJ(Blad1!$P$2:$P$16921)-RIJ(Blad1!$P$2)+1;"");1))} )
So what I try to do here is to find the matching ordernumber which meets the following requirements:
Can somebody help me with my question? Would appreciate it a lot (and to learn more about array formulas)
If something is not clear, please let me know.
Thank you!
The situation that I have is the following:
Sheet1: (start and end times of orders)
Machine (CELL B1) | OrderNumber (CELL E1) | StartTime (CELL P1) | EndTime (CELL Q1) |
Machine1 | 00001 | ||
Machine2 | 00002 | ||
Machine3 | 00003 | ||
Machine4 | 00004 | ||
Machine1 | 00005 | ||
Machine2 | 00006 | ||
Machine3 | 00007 | ||
Machine1 | 00008 | ||
Machine4 | 00009 |
Sheet2: (given downtimes)
Machine (Cell A1) | StartTime (Cell B1) | EndTime (Cell C1) | OrderNumber (Cell D1) |
Machine1 | (Here I need the formula to look up the OrderNumber) | ||
Machine2 | |||
Machine3 | |||
Machine4 |
The array formula I have right now is the following:
{=INDEX(SHEET1!$E$2:$E$16921,SMALL(IF((SHEET1!$P$2:$P$16921<=$B2)*(SHEET1!$Q$2:$Q$16921>=$C2),ROW(SHEET1!$P$2:$P$16921)-ROW(SHEET1!$P$2)+1,"");1))}
( DUTCH formula: {=INDEX(Blad1!$E$2:$E$16921;KLEINSTE(ALS((Blad1!$P$2:$P$16921<=$B2)*(Blad1!$Q$2:$Q$16921>=$C2);RIJ(Blad1!$P$2:$P$16921)-RIJ(Blad1!$P$2)+1;"");1))} )
So what I try to do here is to find the matching ordernumber which meets the following requirements:
- The starttime in sheet1 should be smaller or equal to the starttime in sheet2 (in the same row as the formula);
- The endtime in sheet1 should be bigger or equal to the endtime in sheet2 (in the same row as the formula);
- The machine in sheet1 should be equal to the machine in sheet2 (the machine of the row of the formula) (this is not part of the formula right now)
Can somebody help me with my question? Would appreciate it a lot (and to learn more about array formulas)
If something is not clear, please let me know.
Thank you!