+ Reply to Thread
Results 1 to 11 of 11

Google Sheet based on time formula

  1. #1
    Registered User
    Join Date
    03-13-2023
    Location
    Paris, France
    MS-Off Ver
    2302
    Posts
    11

    Google Sheet based on time formula

    Hello guys, I'm agregating data that I'm pulling out from different sheets with different time update. I have no way to change the time for the other sheets (I won't go into details it's complicated).
    So I was wondering if there is a formula that can sumifs based on the time: ie if time before 2pm sum data from yesterday, and after 2 pm include data from today?

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: Google Sheet based on time formula

    sumifs()
    may do what you want

    A sample sheet would help here

    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    03-13-2023
    Location
    Paris, France
    MS-Off Ver
    2302
    Posts
    11

    Re: Google Sheet based on time formula

    Thank you It's a google sheet so I don't have any attachement but a link. When I try to share it I get this error message "You are not allowed to post any kinds of links, images or videos until you post a few times."
    Here is attached the excel versionGoogle Sheet based on time formula.xlsx

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: Google Sheet based on time formula

    i'm not sure what you are after - no expected results on the sheet
    also on the cost sheet
    no times

    But with excel - functions() nothign changes unless an event happens - so for example - if you use now() as you have then that will not change until somethings happens on the spreadsheet
    cell change - calculating etc

    if you want a live thing going on - then it will need vba - to update the sheet automatically not involving anyone touching the sheet - i dont supply VBA solutions here

  5. #5
    Registered User
    Join Date
    03-13-2023
    Location
    Paris, France
    MS-Off Ver
    2302
    Posts
    11

    Re: Google Sheet based on time formula

    to make a long story short: I would like to be able to sumif from the begining of the month up until yesterday if we are after 2 pm but from the begining of the month up until 2 DAYS AGO if we are before 2 pm. Do you think it is possible with a Google formula?

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: Google Sheet based on time formula

    sorry , should have seen googlesheets - will need to perhaps look at that

    an IF with

    =(NOW()-INT(NOW()))>TIMEVALUE("14:00")

    that will give TRUE or FALSE
    then you can do the SUMIFS()

    todays ago

    =SUMIFS(C:C,A:A,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),A:A,"<"&DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())-2))

    before today
    =SUMIFS(C:C,A:A,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),A:A,"<="&DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())))

    so
    =IF((NOW()-INT(NOW()))>TIMEVALUE("14:00"),SUMIFS(C:C,A:A,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),A:A,"<="&DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())-2)),SUMIFS(C:C,A:A,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),A:A,"<="&DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))))

    but as i say it wont work - until the spreadsheet is updated

    i have important into google sheets and seems to give same result
    Attached Files Attached Files
    Last edited by etaf; 03-13-2023 at 09:57 AM.

  7. #7
    Registered User
    Join Date
    03-13-2023
    Location
    Paris, France
    MS-Off Ver
    2302
    Posts
    11

    Re: Google Sheet based on time formula

    Thank you very much for having looked into my request

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: Google Sheet based on time formula

    you are welcome

    I have imported into google sheets

    just see if number changes after 14:00

    tested and seems to work OK
    see cell H5

    https://docs.google.com/spreadsheets...it?usp=sharing
    should be open to anyone
    Last edited by etaf; 03-13-2023 at 10:07 AM.

  9. #9
    Registered User
    Join Date
    03-13-2023
    Location
    Paris, France
    MS-Off Ver
    2302
    Posts
    11

    Re: Google Sheet based on time formula

    Will do ASAP. I'll let you know how it goes

  10. #10
    Registered User
    Join Date
    03-13-2023
    Location
    Paris, France
    MS-Off Ver
    2302
    Posts
    11

    Re: Google Sheet based on time formula

    it's working this is brilliant!!!!!!!! Thank you so very much

  11. #11
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: Google Sheet based on time formula

    you are welcome

+ 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. Google Sheet : Import Range Based on Certainty Column With Single Formula
    By Jhon Mustofa in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 06-16-2022, 07:13 PM
  2. [SOLVED] Google Sheet : Script Blinking Cell Never Stop Time Based on CF Formula
    By Jhon Mustofa in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 01-12-2022, 10:39 AM
  3. [SOLVED] Google Sheet : Determine New Due Date based On system Date Google Then Given CF Color
    By Jhon Mustofa in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 8
    Last Post: 01-09-2022, 11:48 AM
  4. [SOLVED] Google Sheet : Query Formula Based On Date (Only format mm-yyyy)
    By Jhon Mustofa in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 12
    Last Post: 11-25-2021, 09:05 AM
  5. [SOLVED] Google Sheet : Time Stamp Code Work Only in Active Sheet Always Rename Sheet
    By Jhon Mustofa in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 11-23-2021, 10:18 AM
  6. Google sheet: Help to attachment file from Google Drive and send email fill in Google Form
    By sbv1986 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 03-01-2021, 10:47 PM
  7. [SOLVED] time sheet help, format TIME and formula based on the actual time entered.
    By bh mng in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2016, 01:10 PM

Tags for this Thread

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