Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Looking for an Excel Formula

  • 27-03-2007 7:50am
    #1
    Registered Users, Registered Users 2 Posts: 3,892 ✭✭✭


    Hey guy

    If i have a list of dates in this format dd:mm:yyyy hh:mm:ss
    & another list in in the same format

    is there a formula to find the difference between 2 of them in hours?

    Thanks


Comments

  • Closed Accounts Posts: 647 ✭✭✭fintan


    Have you tried?

    =date2-date1

    It may gie you an answer in date format, but change the format of the "answer" cell to numbers


  • Registered Users, Registered Users 2 Posts: 3,892 ✭✭✭madrab


    yeah but that gives me a number answer that doesnt convert into hours

    ie
    Date1 24/03/2007 10:00:00
    Date2 27/03/2007 07:00:00

    date2-date2 = 2.875 in general form
    = 02/01/1900 21:00:00 in date form


  • Closed Accounts Posts: 647 ✭✭✭fintan


    madrab wrote:
    yeah but that gives me a number answer that doesnt convert into hours

    ie
    Date1 24/03/2007 10:00:00
    Date2 27/03/2007 07:00:00

    date2-date2 = 2.875 in general form
    = 02/01/1900 21:00:00 in date form

    But the answer is 2.875 days, so you need to construct a wee formula to convert that to hours?

    Alternatively use a formula to separate (use the LEFT and RIGHT formulas)the date and the hours from each other and then take them away from each and then work it out

    Another method would be to use the =DAYS360 formula but this will only count the days not the hours


  • Closed Accounts Posts: 155 ✭✭h0stn0tf0und


    Hey madrab,

    I had to do this before,

    I set the date cells to custom format dd/mm/yyyy HH:MM

    I then used this formula
    =CONCATENATE(LEFT((B2-A2)*24,FIND(".",((B2-A2)*24))-1),":",ROUND(RIGHT((B2-A2)*24,LEN((B2-A2)*24)-(FIND(".",((B2-A2)*24))-1))*60,0))

    I round the minutes up.
    I had a header row thats why I am starting from A2/B2

    Might not be exactly what your after but it might help you on your way.


  • Registered Users, Registered Users 2 Posts: 3,892 ✭✭✭madrab


    cool, thanks for the help


  • Advertisement
Advertisement