Hello,
I need to calculate how many minutes early/late a train arrived. I am comparing the scheduled train arrival, versus the actual train arrival. I have tried many formulas, but can't find a formula that works for all five scenarios I've encountered in my data below. Please note I must use the 1900 Excel date system (Windows default) and the calculated minutes early/late must remain numeric (not text), so that I can use those values in future calculations.
[TABLE="width: 955"]
<tbody>[TR]
[TD]Scenario[/TD]
[TD]Scenario Description[/TD]
[TD]Scheduled
Train Arrival[/TD]
[TD]Actual
Train Arrival[/TD]
[TD]Current Function Used[/TD]
[TD="align: center"]Result
Minutes Early/Late[/TD]
[TD]Desired Result?[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Train was late[/TD]
[TD]8:58 AM[/TD]
[TD]9:05 AM[/TD]
[TD]=IFERROR((D5-C5)*1440,"")[/TD]
[TD] 7.00[/TD]
[TD] Yes[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Train was early[/TD]
[TD]5:50 PM[/TD]
[TD]5:48 PM[/TD]
[TD]=IFERROR((D6-C6)*1440,"")[/TD]
[TD] (2.00)[/TD]
[TD] Yes[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Train was exactly on-time[/TD]
[TD]7:07 PM[/TD]
[TD]7:07 PM[/TD]
[TD]=IFERROR((D7-C7)*1440,"")[/TD]
[TD] (0.00)[/TD]
[TD] Yes[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Train arrived after midnight.[/TD]
[TD]11:03 PM[/TD]
[TD]12:00 AM[/TD]
[TD]=IFERROR((D8-C8)*1440,"")[/TD]
[TD] (1,383.00)[/TD]
[TD] No (should be "57")[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Train arrived after midnight.[/TD]
[TD]11:03 PM[/TD]
[TD]missing[/TD]
[TD]=IFERROR((D9-C9)*1440,"")[/TD]
[TD][/TD]
[TD] Yes[/TD]
[/TR]
</tbody>[/TABLE]
I need to calculate how many minutes early/late a train arrived. I am comparing the scheduled train arrival, versus the actual train arrival. I have tried many formulas, but can't find a formula that works for all five scenarios I've encountered in my data below. Please note I must use the 1900 Excel date system (Windows default) and the calculated minutes early/late must remain numeric (not text), so that I can use those values in future calculations.
[TABLE="width: 955"]
<tbody>[TR]
[TD]Scenario[/TD]
[TD]Scenario Description[/TD]
[TD]Scheduled
Train Arrival[/TD]
[TD]Actual
Train Arrival[/TD]
[TD]Current Function Used[/TD]
[TD="align: center"]Result
Minutes Early/Late[/TD]
[TD]Desired Result?[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Train was late[/TD]
[TD]8:58 AM[/TD]
[TD]9:05 AM[/TD]
[TD]=IFERROR((D5-C5)*1440,"")[/TD]
[TD] 7.00[/TD]
[TD] Yes[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Train was early[/TD]
[TD]5:50 PM[/TD]
[TD]5:48 PM[/TD]
[TD]=IFERROR((D6-C6)*1440,"")[/TD]
[TD] (2.00)[/TD]
[TD] Yes[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Train was exactly on-time[/TD]
[TD]7:07 PM[/TD]
[TD]7:07 PM[/TD]
[TD]=IFERROR((D7-C7)*1440,"")[/TD]
[TD] (0.00)[/TD]
[TD] Yes[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Train arrived after midnight.[/TD]
[TD]11:03 PM[/TD]
[TD]12:00 AM[/TD]
[TD]=IFERROR((D8-C8)*1440,"")[/TD]
[TD] (1,383.00)[/TD]
[TD] No (should be "57")[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Train arrived after midnight.[/TD]
[TD]11:03 PM[/TD]
[TD]missing[/TD]
[TD]=IFERROR((D9-C9)*1440,"")[/TD]
[TD][/TD]
[TD] Yes[/TD]
[/TR]
</tbody>[/TABLE]