+ Reply to Thread
Results 1 to 4 of 4

Simple IF function query (hopefully)

  1. #1
    Registered User
    Join Date
    03-13-2006
    Posts
    7

    Simple IF function query (hopefully)

    Hi,

    I have two columns (J & U) that contains date values (dd/mm/yyyy if it's important.)

    I know how to calculate the number of days between the two which I've done in column V, however in some cases one or both of columns J & U are blank. In these cases I'd like my results column to just return blank also.

    Can I make this happen using an IF function? I'd use conditional formatting, but really just need the cell to contain no value at all rather than one I can't see.

    Thanks in advance,

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    If J contains the start date and U contains the end date

    Try =IF(AND(J1>0,U1>0),U1-J1,"") as you calculation

    Regards

    Dav

  3. #3
    paul
    Guest

    RE: Simple IF function query (hopefully)

    =IF(OR(ISBLANK(J1),ISBLANK(U1)),"",J1-U1)

    paul
    [email protected]
    remove nospam for email addy!



    "ahaigh" wrote:

    >
    > Hi,
    >
    > I have two columns (J & U) that contains date values (dd/mm/yyyy if
    > it's important.)
    >
    > I know how to calculate the number of days between the two which I've
    > done in column V, however in some cases one or both of columns J & U
    > are blank. In these cases I'd like my results column to just return
    > blank also.
    >
    > Can I make this happen using an IF function? I'd use conditional
    > formatting, but really just need the cell to contain no value at all
    > rather than one I can't see.
    >
    > Thanks in advance,
    >
    >
    > --
    > ahaigh
    > ------------------------------------------------------------------------
    > ahaigh's Profile: http://www.excelforum.com/member.php...o&userid=32414
    > View this thread: http://www.excelforum.com/showthread...hreadid=531477
    >
    >


  4. #4
    Registered User
    Join Date
    03-13-2006
    Posts
    7
    That's great,

    Cheers

+ 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