# Thread: If OR statements (2000)

1. ## 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. ## Re: If OR statements (2000)

Try this formula:

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

Jackal

3. ## 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.

#### Posting Permissions

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