Announcement

Collapse
No announcement yet.

Blank Cell If Value Is Zero

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Blank Cell If Value Is Zero

    Afternoon all

    I am looking for some help making the formula i am using appear blank if there is not yet values entered in the cells

    i am using =DATEDIF(A1,B1,"m")

    i am trying to find the difference between 2 dates in months but if the values have not been entered into the cells then it populates as zero? is there a way i can leave it blank

    Thanks heaps for your help

    Terri

  • #2
    Re: Blank Cell If Value Is Zero

    Hi Terri,

    Assuming the dates are in cells A1 & B1, use the following formula in your destination cell:

    =IF(OR(A1="",B1=""),"",DATEDIF(A1,B1,"m"))

    Kind regards,

    Robert
    : D

    Comment


    • #3
      Re: Blank Cell If Value Is Zero

      thanks so much your a life saver : D

      Comment


      • #4
        Re: Blank Cell If Value Is Zero

        You can also hide zeros from the Tools > Options > View menu
        Hope that Helps

        Roy

        New users should read the Forum Rules before posting

        For free Excel tools & articles visit my web site

        If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

        RoyUK's Web Site

        royUK's Database Form

        Where to paste code from the Forum

        About me.

        Comment


        • #5
          Re: Blank Cell If Value Is Zero

          Originally posted by royUK
          You can also hide zeros from the Tools > Options > View menu
          If you do this, it is important to realise that the cell content will still be 0, not blank, so any tests for cell contents must still be for 0 - can be a bit confusing.
          .

          Comment

          Working...
          X