+ Reply to Thread
Results 1 to 6 of 6

Days between two dates (with conditions)

  1. #1
    Registered User
    Join Date
    01-04-2019
    Location
    New York, NY
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Days between two dates (with conditions)

    Hi all,

    I'm trying to post a question about a formula and every time I try, I get a message that says I'm not allowed to posts links or videos. My post has no links or videos. Just the formula and my question.
    I can't find a "help" section for posting issues either.
    I even tried copypaste my question within this post and the message about links not allowed came back again. I have no links. Just a formula. Help?!
    Last edited by JustMax; 01-05-2019 at 12:52 AM.

  2. #2
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Re: Days between two dates (with conditions)

    Quote Originally Posted by JustMax View Post
    Hi all,

    I'm trying to post a question about a formula and every time I try, I get a message that says I'm not allowed to posts links or videos. My post has no links or videos. Just the formula and my question.
    I can't find a "help" section for posting issues either.
    I even tried copypaste my question within this post and the message about links not allowed came back again. I have no links. Just a formula. Help?!
    Are you using Formula Tags like this?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: Days between two dates (with conditions)

    Max, welcome to the forum

    1st, you can only post links after having 10 posts or more. This is to assist in preventing spam. (I know, you said you were not posting links)
    2nd, if your formula (that you are trying to post) contains < or > make sure you leave a space each side, otherwise the bot thinks you are posting HTML code
    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

  4. #4
    Registered User
    Join Date
    01-04-2019
    Location
    New York, NY
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: Days between two dates (with conditions)

    Thanks unit285 and FDibbins. I rewrote the formula to remove brackets and space after =. Not sure if that was the issue.

    This is my original post:

    I'm trying to calculate the number of weekdays a piece of equipment was at a specific location*.
    I have column D for Delivery date and Column E for Pickup date. On Column F, I used the Networkdays formula to get the number of days the equipment was at that location.
    However, if the equipment has not been picked up yet at the time I'm running the report (which is weekly), then I want to calculate the number of days that equipment has been at that location since delivery date and up to the day I am running the report. Outside of the table I have Cellsfor "report date" and =today()
    I tried this formula but it doesn't work if the pickup date cell is blank: = IF(Pickup Date=" ",NETWORKDAYS(Delivery Date,TODAY()),NETWORKDAYS(Delivery Date,Pickup Date))

    Thank you for your time!
    *I don't know if this is relevant but I'm working with a long list of equipment and locations, logged on a table. Entries to the table occur daily, but the report for total days per equipment/location will be weekly.

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

    Re: Days between two dates (with conditions)

    From what I can see your formula is what you need, but it contains one tiny rookie mistake

    =IF(Pickup Date="",NETWORKDAYS(Delivery Date,TODAY()),NETWORKDAYS(Delivery Date,Pickup Date))

    You need to use ="" to look for a blank cell, not =" ", this works with empty cells and cells that contain a formula but appear empty (blanks).

    Similarly, if you use a formula to show a blank cell, then you should also use "" instead of " ".
    Using " " in this instance means that you would then possibly need to check the contents twice, once for an empty cell, a second time for a formula that appears empty but shows " ".

  6. #6
    Registered User
    Join Date
    01-04-2019
    Location
    New York, NY
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: Days between two dates (with conditions)

    Thanks, jason.b75!
    rookie mistake indeed.

+ 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. Replies: 10
    Last Post: 02-19-2019, 03:28 AM
  2. Replies: 2
    Last Post: 01-03-2019, 05:36 PM
  3. [SOLVED] How many WEEKEND DAYS & HOLIDAY DAYS between 2 dates in September
    By leovfx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-12-2017, 07:32 PM
  4. Replies: 1
    Last Post: 02-26-2015, 06:12 PM
  5. Replies: 0
    Last Post: 10-31-2014, 10:32 AM
  6. [SOLVED] Number of Days Between Dates but if no Date go to next and return # of Days
    By Bikeman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2012, 12:02 PM
  7. [SOLVED] Subtract Two Dates By The Number of Days, But Only Inlcude Work Days
    By ptho16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2012, 11:31 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