+ Reply to Thread
Results 1 to 6 of 6

Help with an "if" formula

Hybrid View

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    85

    Help with an "if" formula

    Hello im after some help

    I have a spreadsheet and in column A I have a date and then in column B there is another date. I need to have a formula which can calculate the days passed between each date (which is easy enough) but if the cell is blank it would need to calculate the days passed between column A and the current date. Please can someone help I think I need an if formula but im not sure.
    Last edited by gandyling; 11-10-2011 at 03:16 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Help with an "if" formula

    Maybe =IF(B1="",today()-A1,B1-A1)

  3. #3
    Registered User
    Join Date
    10-03-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    85

    Re: Help with an "if" formula

    Hi thanks for that it works like a charm!

  4. #4
    Registered User
    Join Date
    10-03-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    85

    Re: Help with an "if" formula

    Thanks for your help I need a little more help, is there any way the formula could return a blank cell if there are no dates at all?

    Thanks again

  5. #5
    Registered User
    Join Date
    02-04-2011
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Help with an "if" formula

    =if(isblank(a1),"",if(b1="",today()-a1,b1-a1))

  6. #6
    Registered User
    Join Date
    10-03-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    85

    Re: Help with an "if" formula

    Thanks thats perfect

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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