• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

to use between mm/dd/yyyy and mm/dd/yyyy to return as next day

rafiz87

New Member
What formula need to use to eg: between 11/03/2024 16:00:00 and 12/03/2024 09:00 to return as next day is mean 12/03/2024. currently i use formula =IF($A2="","",IF($A2="","No Scan",INT($A2)+IF(MOD($A2,1)>=TIME(16,0,0),1,0))). Attached the file for reference. Hope someone can help to solve this matter.
 

Attachments

  • Files.xlsx
    259.4 KB · Views: 5
I'm not at a computer right now but perhaps
INT(A2+(1/3))
or
INT(CEILING.MATH(A2,1/3))
1/3 of a day being 8 hours, 16:00 + 8 hours = midnight.
I will look more closely later.

Edit: later: seems OK, with a difference with what happens at exactly 16:00 where the CEILING formula aligns with your original formula results.
 
Last edited:
Back
Top