+ Reply to Thread
Results 1 to 4 of 4

Calculation of dates and leaving blank cell when calculation sees non-date values

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Calculation of dates and leaving blank cell when calculation sees non-date values

    I have a variation of my most recently solved last post.

    Capturing the number of days in cell T4 where there are two dates (Date Received in cell Q4 and Date Completed in cell S4), and leaving cell T4 blank when cell Q4 or cell S4 are blank or contain a non-date value.

    Date Received (Q4) is 4/30/18 subtracted from Date Completed (S4) which is 5/15/18 gives you a difference of 12 days, when factoring in the weekend and holidays.

    =IF(ISNUMBER(Q4),NETWORKDAYS(Q4,S4,HOLIDAYS!$A:$A),"")

    Somewhere I need to add a reference to S4 I believe.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: Calculation of dates and leaving blank cell when calculation sees non-date values

    Try

    =if(and(isnumber(q4),isnumber(s4)),networkdays(q4,s4,holidays!$a:$a),"")

  3. #3
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    483

    Re: Calculation of dates and leaving blank cell when calculation sees non-date values

    Or this, with fewer function calls:

    =IF(COUNT(Q4,S4)=2,NETWORKDAYS(Q4,S4,HOLIDAYS!$A:$A),"")

  4. #4
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Calculation of dates and leaving blank cell when calculation sees non-date values

    Thank you again!

+ 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] Formula for converting a date to quarter and leaving blank cell for no date values
    By jayc2111 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2019, 12:57 AM
  2. RE: date calculation, no date displays for blank adjacent cell
    By kittycrickett in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-11-2015, 10:55 AM
  3. Date Formula and leaving cell blank when no date is entered
    By Texguy02 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-31-2015, 02:57 PM
  4. Calculation of dates, return blank when one of the dates is not populated
    By brian_2me in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-15-2014, 10:59 AM
  5. Leaving a calculated cell blank until ready for calculation
    By Laliberte78 in forum Excel General
    Replies: 4
    Last Post: 12-21-2011, 05:02 PM
  6. Adding years to a date, but leaving blank if no date in the original cell.
    By buddyhackit9 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-12-2011, 01:17 AM
  7. Adding Dates but leaving a cell blank
    By dodger999 in forum Excel General
    Replies: 5
    Last Post: 08-21-2009, 03:35 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