Glam Prestige Journal

Bright entertainment trends with youth appeal.

I'm trying to run a time-sheet import excel sheet to our software. It has columns as follows: 'employee name', 'start time', 'end time', and 'total hours'. Problem is that some 'start time' and 'end time' rows don't have AM/PM. When i edit the formatting of the cell it should show if it's AM or PM it just adds AM to all.

example: start time 8:00 end time 3:30 total hours 7.5

In the above example, the end time 3:30 is clearly PM since total hours is 7.5.

Question: is there a formula in excel to add in the start/end time cells whether this time is AM or PM ACCORDING TO THE TOTAL HOURS?

1

3 Answers

Select the following Time format.

enter image description here
The PM time format shows AM and PM
Notice the sample is showing AM for the data currently in the cell.

1

Import: Use an Excel Sheet, Helper-Column Instead of End Time column.

End Time Helper-Column =[StartTime] + [TimeWork]

  • Depending on the software doing the import, this may be a solution
    available in the import script or the import configuration settings.

Further refinement when start times occur in the PM:

Start Time Helper-Column =If([StartTime] > [AM/PM-CutOff], [StartTime], [StartTime] + TIME(12,0,0))

  • Where [AM/PM-CutOff] is Time(Hours,Mins,Secs)
  • After what hour:Min is the Start time definitely AM? (Is 4:00 an AM or PM start time?)
  • The cut off could be further refined based on the hours worked.

Basically this happens due to improper TIME Format, applied to cells.

enter image description here

How it works:

  • Select Start & End Time Cells, and apply HH:MM AM/PM Format.
  • Apply [H]:MM Time Format to cells, before you apply Formula to get Time Difference.

N.B.

  • While enter Time in cells, the Time must according to 24 Hrs Clock, for example 15:30 for 03:30 PM, since cells has TIME Format HH:MM AM/PM.
  • In case both Start & End Time Cells has HH:MM AM/PM Format and the Formula cells has GENERAL better use this Formula.

=(EndTime-StartTime)*24.

You get 7.5.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy