Editing the first two digits of a cell

gary_savage

New Member
Joined
Jun 21, 2011
Messages
2
I would appreciate any help....

I have lots of spreadsheets with times on them, I'm trying to get the average runtimes of each line but I am having problems calculating it as some of the end times end after midnight so it thinks it's on the same day as when the job started E.G.

Jobname Start Time End Time

Example 22:45 01:05

I have worked out a way to correct this problem by changing the 01 to 25 00 will be 24 and 02 will be 26 etc. All I need is a macro that will change this for me or I have to go through five months worth and edit it manually.

Thanks in advance

Gary
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I would appreciate any help....

I have lots of spreadsheets with times on them, I'm trying to get the average runtimes of each line but I am having problems calculating it as some of the end times end after midnight so it thinks it's on the same day as when the job started E.G.

Jobname Start Time End Time

Example 22:45 01:05

I have worked out a way to correct this problem by changing the 01 to 25 00 will be 24 and 02 will be 26 etc. All I need is a macro that will change this for me or I have to go through five months worth and edit it manually.

Thanks in advance

Gary

Try...

=B1 - A1 + (B1 < A1)
 
Upvote 0
Thanks for your reply but it's not that bit I need to change, I need to change the times before they are all averaged out your formula will work once I have changed all the times to be correct.

At the moment because it thinks some jobs finished at e.g. 01:00 it is taken the time as 01:00 on the same day as the 22:50 when it started by changing the time to 25:00 which still displays as 01:00 it takes it that it's on the next day
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

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