+ Reply to Thread
Results 1 to 4 of 4

Days Formula - Need Blank Cell Solution

  1. #1
    Registered User
    Join Date
    07-26-2017
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    2

    Days Formula - Need Blank Cell Solution

    Hello,

    I need assistance in adjusting a formula that is currently being used to determine the difference between two dates.

    =IF(I2<>"",(DAYS(I2,H2)),"")

    The columns being used are H-J. H is a deadline date. I is the date the information was received. J is the difference between the two dates and where the formula is located. For example, a deadline was requested for June 20th (H) and the requested information was received on June 23rd (I), so J returns the number 3.

    My problem is that on occasion we do not have a deadline (for various reasons) and receive information after the fact. In those instances, we are still entering the date the information was received in column I, but column H is left blank (since no deadline had been requested). This results in a long number being returned in column J (ex. H is blank, I is June 21st, J returns 42907).

    I need the formula to ignore the blank cell, or rather, return either a blank cell or a zero value in column J if H is blank. I've tried messing with the formula and can't seem to get it to work. Help!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,500

    Re: Days Formula - Need Blank Cell Solution

    how about =if(I2="","",(days(I2,H2))
    if you want a zero then adjust to =if(I2="",0,(days(I2,H2))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Days Formula - Need Blank Cell Solution

    MeAliasX, your formula was almost there. Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Although it can be simplified:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by gak67; 07-26-2017 at 04:47 PM.
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  4. #4
    Registered User
    Join Date
    07-26-2017
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Days Formula - Need Blank Cell Solution

    Thank you both! Either formula worked for my purposes.

+ 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: 11
    Last Post: 06-06-2021, 01:42 AM
  2. Replies: 1
    Last Post: 08-12-2016, 12:10 PM
  3. [SOLVED] +2 date formula adds 2 days to blank cells
    By opusarlo in forum Excel General
    Replies: 7
    Last Post: 04-21-2015, 06:03 AM
  4. Replies: 4
    Last Post: 01-29-2014, 05:34 PM
  5. [SOLVED] # of days a cell has been blank from last date until now
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 01:59 PM
  6. [SOLVED] Complaints Sheet - Highlighting row if blank cell is blank for two days
    By northern88 in forum Excel General
    Replies: 4
    Last Post: 11-01-2012, 07:41 PM
  7. [SOLVED] Formula for # of days since today, if blank or if cell filled in. Want in number format?
    By teenyjem in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-10-2012, 11:46 AM

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