+ Reply to Thread
Results 1 to 8 of 8

Issue with balnk cells.....

  1. #1
    Registered User
    Join Date
    04-21-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Issue with balnk cells.....

    Hi

    I have a formula in a cell which brings back a certain date.
    However the referenced cells maybe blank as such my initial formula will bring back 00/01/1900. I did struggle trying to find a way for excel not show this figure and found the following works.

    custom format:
    dd/mm/yyyy;;
    ( note the 2 ;; )

    this will leave the cells blank and me happy.


    Yet.

    in a subsequent cell I am using this cell with the blank as a reference and using the following formula:

    =IF(ISBLANK(R30),"NA",IF(ISBLANK(L30),"NA",R30-L30))

    The issue I not face is that this formula above does not see that R30 is blank,
    whilst it looks blank it really show 00/01/1900.

    the result of the formula above is -40694 which looks like a date in number format.
    I want to ensure that if either R30 or L30 are blank then a NA is returned. otherwise to perform the r30 - l30.


    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Issue with balnk cells.....

    Hi

    Maybe you could use this instead

    =IF(R30<1,"NA",IF(L30<1,"NA",R30-L30))
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Registered User
    Join Date
    04-21-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Issue with balnk cells.....

    Hi

    This does work!
    However I have noticed that if both cells are blank (contain the 00/01/1900), the a #Value occurs.

    Would I need to enter in a iserror?

  4. #4
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Issue with balnk cells.....

    Hi Gareth

    I don't see how you get an Error.

    The IF statement works from left to right.
    If R30 is <1, then it returns NA and stops at that point.
    Therefore, whether both are blank is immaterial, it should never get past the first IF test.

  5. #5
    Registered User
    Join Date
    04-21-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Issue with balnk cells.....

    agreed, cant seem to get aroudn this error currently.
    Still coming up with #Value

    I think this is why I started with the Isblank function.

    I did just try the iserror as well and it still comes up

  6. #6
    Registered User
    Join Date
    04-21-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Issue with balnk cells.....

    now it works, have changed it r30=""

    for some reason why I saved the previous file and reopened, the 00/01/1900 values all turned in proper blanks, no need to change format.

    I am perplexed!

  7. #7
    Registered User
    Join Date
    04-21-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Issue with balnk cells.....

    the issue is....

    some cells are real Blanks as in ""

    others are 00/01/1900

    the formula is unable to deal with "", it can only deal with 00/01/1900

    so i need to amend formula so R30<1 or ""

  8. #8
    Registered User
    Join Date
    04-21-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Issue with balnk cells.....

    this works!

    =IF(OR(R162="",R162<1),"NA",IF(OR(L162="",L162<1),"NA",R162-L162))

    thanks once again!

+ 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