Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Dec 2003
    Location
    London, England
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    If OR statements (2000)

    Is there a formula which says that if either "Minute A" or "Minute B" is blank then a blank should be returned as the answer - Is it an If OR statement ? However if either has a value then subtract B from A ?

  2. #2
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: If OR statements (2000)

    Try this formula:

    =IF(AND(B1="",C1=""),"",B1-C1)

    Jackal

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If OR statements (2000)

    Your question is ambiguous since if either of the values is blank you want to return a blank but if either is not blank you want to return the difference. If one is blank and one has a value, what do you want? Jackal gave you the answer that returns the difference if either is not blank and returns a null if both are empty. However, since returning a difference if one of them is blank does not make a lot of sense, I will assume that you really meant to only return the difference if both have values:

    <pre>=IF(OR(TRIM(B1)="",TRIM(C1)=""),"",B1-C1)
    </pre>


    My formula also works if either cell actually contains only blank characters.
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •