+ Reply to Thread
Results 1 to 19 of 19

Count values based on the current time

  1. #1
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Count values based on the current time

    Hi all,

    I am trying to find a formula to count the values based on the entry time and current time.

    I have put a time buckets to count the values of each person. The value should be returned is that based on the current time and entry time, we need to return the values in the summary.

    Can anyone please help me out.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Count values based on the current time

    IN B7 then dragged across
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Count values based on the current time

    Hi thank you. But I am not seeing any values returning against each user.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Count values based on the current time

    Hi

    You can try this other approach with a helper column

    In H6 use this formula and drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In B6 use this formula and drag forward and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Count values based on the current time

    Hi Jose,

    Thank you for the file. But i am really sorry I am unable to understand the logic u have done. Can u please explain me...

  6. #6
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Hi Thank you. But I don't see any values returning against the user names. Can u tell me what is the logic u have used.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Count values based on the current time

    I will take a look t your file, but note that TIME is a volatile function that only updates with a worksheet/file change.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Count values based on the current time

    Change the vales in B2:B6 suitably then you will see readings. Otherwise you will see all readings in last colmn as the difference in time is more than 7 Hrs as the day is also counted for calculation.

  9. #9
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Quote Originally Posted by kvsrinivasamurthy View Post
    Change the vales in B2:B6 suitably then you will see readings. Otherwise you will see all readings in last colmn as the difference in time is more than 7 Hrs as the day is also counted for calculation.

    Hi- please refer attached. Even though I changed the values, there is no values returning against the names.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Count values based on the current time

    Hi Jose,

    I tried your file however I see values are getting returned. But what is the calculation that u used as =now()+4.2/24.

    When I change the values in b2:b6 the values get disappeared in the main sheet. Can you please check and let me know.

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Count values based on the current time

    Pl read my explanation in my previous post.

  12. #12
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Quote Originally Posted by kvsrinivasamurthy View Post
    Pl read my explanation in my previous post.
    Hi I tried modifying the values but still the values did not populate. Please refer my attached Excel updated in the previous post. And let me know what is the disconnect.

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Count values based on the current time

    To show that formula is working I have changed H2 value, fixed time given. Pl see file.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 08-04-2019 at 08:26 AM.

  14. #14
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Quote Originally Posted by kvsrinivasamurthy View Post
    To show that formula is working I have changed H2 value, fixed time given. Pl see file.
    I think you have manually updated the base time. The base time should be considered as =now () which will result in the current time.

    I changed the values for mathew and it is getting disappeared
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Count values based on the current time

    Try this formula in B7 of the sample file from post #9 (or from post #13).
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The results of this formula differ from kvsrinvivasamurthy's, hopefully one of us has it right.

  16. #16
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Count values based on the current time

    Hi Jason

    Appreciate all your help. But I am sorry I m still not getting the values.

  17. #17
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Count values based on the current time

    Have you looked at the file attached to post #13?

    My suggestioon looked right with your original data, but with the changes that kvsrinvivasamurthy made to it to illustrate the problem you were encountering, I can see errors in my logic.

    In my opinion, the file that kvsrinvivasamurthy attached to post #13 gives the 'correct' results based on what you have asked for. If it does not match what you expect, then you need to provide a better explanation, using fixed date and time entries in your sample to illustrate what is needed, not the NOW() function.

    Remember, time changes constantly, adding that to the time zone differences between various users, a sample with =NOW() will always be wrong!

  18. #18
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Count values based on the current time

    Hi Jason

    Agreed that I have used now function. But all I need is to calculate the values based on the current time. So I would get real time values.

  19. #19
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Count values based on the current time

    That can be done after, but first you need to get it working with a fixed time as a control measure (again, see post #13).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count how many Fridays based on the current day of the month
    By Rocky2013 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-10-2018, 11:30 PM
  2. [SOLVED] Calculating a previous work shift time (05:30, or 17:30) based on current time
    By andrew.why in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-20-2017, 09:09 PM
  3. [SOLVED] Count Current workers based on date and those with certain postcode.
    By Wayne Herbert in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2017, 10:41 AM
  4. Replies: 2
    Last Post: 01-21-2014, 02:53 PM
  5. compare time values - current time with time in cell range?
    By wyattea in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2013, 11:28 PM
  6. Count of current chats (time intervals)
    By Alex Fate in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2013, 02:22 AM
  7. Replies: 3
    Last Post: 06-10-2010, 11:54 AM

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