+ Reply to Thread
Results 1 to 12 of 12

Counting day duration

  1. #1
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Counting day duration

    Hi,

    I understand by using =DAYS360(D2,E2), I'm able to get the duration of days from start date and end date. But when I key in start date and end date on the same day, it return 0 day

    I wanted to know if there is other function that i can use get 1 day, I wish to calculate the duration by days.

    Thanks in advance

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Counting day duration

    Try this...

    =IF(D2=E2,1,DAYS360(D2,E2))

    or:

    DAYS360(D2,E2) +(D2=E2)

  3. #3
    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,740

    Re: Counting day duration

    So if its one day apart do you also want to count as 1

    but this is an approximation
    try 1/2/15 to 1/3/15
    and you will get 30 days

    Twelve 30day months
    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.

  4. #4
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Re: Counting day duration

    Quote Originally Posted by Phuocam View Post
    Try this...

    =IF(D2=E2,1,DAYS360(D2,E2))

    or:

    DAYS360(D2,E2) +(D2=E2)
    Thanks for feedback. I got it for a day if I start and end on the same day but I can't get it right for the day after.

  5. #5
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Re: Counting day duration

    Quote Originally Posted by etaf View Post
    So if its one day apart do you also want to count as 1

    but this is an approximation
    try 1/2/15 to 1/3/15
    and you will get 30 days

    Twelve 30day months
    Thanks for you feed back.

  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,740

    Re: Counting day duration

    I got it for a day if I start and end on the same day but I can't get it right for the day after.
    =IF(D2=E2,1,DAYS360(D2,E2))

    should work for you OK
    what error do you get - what result do you get ?
    360 assumes 12 x 30 day months - hence 360

    Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "Choose File" (top Left corner).
    Find your file, click "Open" click "upload" click 'close windows" Top Right. click "Submit Reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    Last edited by etaf; 04-14-2016 at 03:11 AM.

  7. #7
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Re: Counting day duration

    I've attach the file with comments in the sheet. Sheet 2 will be the start page that I with
    Attached Files Attached Files

  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,740

    Re: Counting day duration

    so because it does not count the same day as 1 - it will always be 1 day out

    =IF(C4=D4,1,DAYS360(C4,D4)+1)

    now adds one day to the result

    regarding the comments
    This is not allow as the date is the same or clash with one of the project
    no idea what this means , and not mentioned before
    Was this comment for the forum here ?

  9. #9
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Re: Counting day duration

    Quote Originally Posted by etaf View Post
    so because it does not count the same day as 1 - it will always be 1 day out

    =IF(C4=D4,1,DAYS360(C4,D4)+1)

    now adds one day to the result

    regarding the comments

    no idea what this means , and not mentioned before
    Was this comment for the forum here ?
    It works!. Thanks for your help.

    Regarding my comment, it means No sharing of the same equipment between 2 project if the same dates are selected or within range unless it is under the same booking name.

  10. #10
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Re: Counting day duration

    Regarding the date selection, I wish to click on the cell and a pop up date selection instead of a drop down. Is there like a function of a Perpetual Calendar with pop up?

  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,740

  12. #12
    Registered User
    Join Date
    04-13-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    7

    Re: Counting day duration

    I've create a calendar by a right click on the cell and select insert date. How can I just click on the cell and the pop up calendar appear.
    Attached Files Attached Files

+ 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. counting number and duration of non-continuous events
    By Ragsie123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2013, 06:44 PM
  2. [SOLVED] Formula: To calculate duration between two times, if duration is over 6hours subtract 30mi
    By MattBarnes7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2013, 03:22 PM
  3. Counting duration of songs
    By remixit in forum Excel General
    Replies: 2
    Last Post: 12-16-2010, 04:48 PM
  4. Counting duration within a Work Breakdown Structure
    By chamdan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-17-2010, 09:09 PM
  5. Duration
    By jonmsimon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-09-2009, 03:40 PM
  6. fx duration
    By sajid in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-05-2006, 04:35 AM
  7. Duration
    By citizens1stbank in forum Excel General
    Replies: 0
    Last Post: 07-15-2005, 01:23 PM
  8. [SOLVED] Duration
    By Tess in forum Excel General
    Replies: 3
    Last Post: 02-01-2005, 12:06 PM

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