+ Reply to Thread
Results 1 to 8 of 8

Automated Counter + 24 hour Time Difference.

Hybrid View

  1. #1
    all4excel
    Guest

    Automated Counter + 24 hour Time Difference.

    Automated Counter + 24 hour Time Difference.


    Automated Counter

    I have this tracker where I note down different activities in a day. There can be more than one activity in a particular day or DATE..I will be entering the date in the column A only once and then Enter the different activities performed for that day.Then I will enter the next date again in the column A.I want a counter which counts the number of activities btween two dates and then again start all over again for the next date....


    Time Difference

    I want the differenc in time however I want it to work for a 24 hour format..
    I would aprreciate if could write this in a decimal format rather than putting ":" if that’s possible .For Ex:- Instead of writing 14:30 , I would just write 14.30 but the code should consider it a s time format in the background and give the difference.



    Please provide a solution for the same...Thanks in anticipation..
    Last edited by VBA Noob; 01-26-2008 at 05:39 AM.

  2. #2
    all4excel
    Guest

    Smile Have figured Automatic counter but for Time require help

    Have figured Automatic counter but for Time still require help...

    Code :-
    IF(AND(ISBLANK(A2),ISBLANK(C2)),"",IF(NOT(ISBLANK(A2)),1,IF(ISBLANK(A2),B1+1,1)))

    Please someone help me for the Time Difference...
    Things expected are :

    1. If I can write 14.30 instead of 14:30 in the Start/end Time and get the difference.

    2. If I am working at 19:00 hours and finish my work the next day at 4:00AM early morning ..

    Then it would give me an answer of 19:00 to 24:00 = 5 hours + 4 hoyrs = total hours worked 9 hours.

    Please find the attachment below for the Automated Counter, others can find this useful..

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try


    =(E2-D2+(D2>E2))
    and try the attached for quick time entry

    http://www.cpearson.com/excel/DateTimeEntry.htm


    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    all4excel
    Guest

    Smile Thanks a lot.!

    Dear Noob,

    It worked wel but cn u plz explain what happens (G2-F2+(F2>G2))
    I didnt understand F2 > G2.... I mean what gets added..

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    (F2>G2)
    returns true or false

    Excel reads true as 1 and false as 0

    So if
    G2-F2
    is neg (true) the above adds a 1 i.e 24 hrs so F2 is always > than G2

    VBA Noob

  6. #6
    all4excel
    Guest

    Question Thnks for the explanation

    However, I also had expressed one more thing in my question..

    Is it possible to have the times expressed in G2 and F2 as numbers...
    Like 14.0 or 4.0 ...

    I am basically wanting to type number which should be considered as time for Excel.

    The calculation shud remain the same however the values for ease wud be typed as numbers..

    Like 14:00 wud be typed as 14 or 14.0...

    Is that possible..I remebemr of going thru a link in the forum about time calculated when it was expressed as numbers bur dont have the link anymore..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1