Calculating minutes to midnight

saraapple

Board Regular
Joined
Feb 3, 2020
Messages
165
Office Version
  1. 2010
Platform
  1. Windows
Good morning all,

Something very strange is happening to my excel calculations when I attempt to calculate minutes to midnight.
Here is my data:
Test data.xlsx
ABCDEFG
1STARTENDVal StartVal EndTime to MidnightTime to Midnight MinutesCorrect Answer I don’t get!
218:30 2:1518:302:1505:30:002072490330
318:00 3:1518:003:1506:00:002072520360
4 3:5014:303:5014:3020:10:0020733701210
5 3:5414:003:5414:0020:06:0020733661206
6 3:4813:403:4813:4020:12:0020733721212
7 4:0014:544:0014:5420:00:002073360
8 4:1516:564:1516:5619:45:002073345
9 3:3815:453:3815:4520:22:002073382
10 3:3512:463:3512:4620:25:002073385
11 3:4415:273:4415:2720:16:002073376
12 3:4412:443:4412:4420:16:002073376
13 3:5715:023:5715:0220:03:002073363
1417:54 4:1017:544:1006:06:002072526
15 4:0014:304:0014:3020:00:002073360
16 5:2515:335:2515:3318:35:002073275
17 4:4112:454:4112:4519:19:002073319
18 7:4315:127:4315:1216:17:002073137
19 4:1416:224:1416:2219:46:002073346
2011:4622:5611:4622:5612:14:002072894
2111:4319:3411:4319:3412:17:002072897
Sheet12
Cell Formulas
RangeFormula
C2:D21C2=VALUE(A2)
E2:E21E2=1440-C2
F2:F21F2=E2*1440


As you can see I can calculate time to midnight but when I try and convert it into minutes I get the wrong figure.
If I type the times and use the *1440 calculation it works but it will not use the data I currently have in my sheet. I have tried changing the format but nothing is working.
I am sure this is something simple but for the life of me I cannot see it!!!
If anyone can point me in the right direction I would be most grateful.
Thank you
Sara
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi, you need to change the column E formula to
Excel Formula:
=1-C2
 
Upvote 0
Solution
E2: =(TIME(0,0,0)+1-(C2))
F2: =(TIME(0,0,0)+1-(C2))*60


We do a +1 to flip the time to the next day if you're curious.
 

Attachments

  • wwww.PNG
    wwww.PNG
    80.6 KB · Views: 7
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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