Puzzeld by result

mole999

Well-known Member
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
I have rota conversion tool (the plan changed so I ditched IF in favour of LOOKUP and INDEX methods, both provide unexpected results)



For a reason I have not been able to determine the 06-13 shift and 06-14:30 both produce the wrong value and I can't see what must be plainly obvious

Excel Workbook
ABCDEFG
1StartFin
26:0012024024
36:301502702.54.5
47:0018030035
57:302103303.55.5
68:001503302.55.5
78:3018036036
89:002103903.56.5
99:3024042047
1010:0024042047
1110:302704504.57.5
1211:002704504.57.5
1311:302704504.57.5
1412:002704504.57.5
Times
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I don't fully understand what you're trying to achieve but I suspect your issue is down to using MATCH() with times which are fractional values. You might consider changing your Times table to use minutes at which point you could use an exact match. I re-worked your sheets like this:


Book1
ABCDEFG
1StartFin
236012024024
33901502702.54.5
442018030035
54502103303.55.5
64801503302.55.5
751018036036
85402103903.56.5
957024042047
1060024042047
116302704504.57.5
126602704504.57.5
136902704504.57.5
147202704504.57.5
Times
Cell Formulas
RangeFormula
F2=B2/60
G2=C2/60



Book1
AKALAMANAOAPAQARASAT
3306:0012:000600-1200120240360 6:00 
3406:0012:300600-1230150270390306:306:00
3506:0013:000600-1300180300420307:006:30
3606:0013:300600-1330210330450307:307:00
3706:0014:000600-1400150330480308:007:30
3806:0014:300600-1430180360510308:308:00
3906:0015:000600-1500210390540309:008:30
4006:0015:300600-1530240420570309:309:00
4106:0016:000600-16002404206003010:009:30
4206:0016:300600-16302704506304510:309:45
4306:0017:000600-17002704506604511:0010:15
4406:0017:300600-17302704506904511:3010:45
4506:0018:000600-18002704507204512:0011:15
Sheet2
Cell Formulas
RangeFormula
AK33=LEFT(AN33,2)&":"&MID(AN33,3,2)
AL33=MID(AN33,6,2)&":"&MID(AN33,8,2)
AO33=INDEX(Times!$B$1:$B$14,(MATCH($AQ33,Times!$A$1:$A$14,0)))
AP33=INDEX(Times!$C$1:$C$14,(MATCH(AQ33,Times!$A$1:$A$14,0)))
AQ33=MID(AN33,6,2)*60+MID(AN33,8,2)-MID(AN33,1,2)*60-MID(AN33,3,2)
AR33=IF(AK33="","",IF(AQ33<=360,"",IF(AQ33<=600,30,45)))
AS33=IF(AQ33=0,"",AQ33/1440)
AT33=IF(AR33="","",AS33-AR33/1440)


WBD
 
Upvote 0
Thanks WBD That's what I needed. I had tried pushing the times down and up, but wasn't getting a match
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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