If with and


G

Guest

I want to write a simple formula. In column A and B I have values. In column
C I write my formula. I want to check if A and B anre not zero and if they
are both not zero I want to take A minus B. Now I tried writing it like this:

=IF((A22<>0 & B22<>0);A22-B22;"-")

It does not work. It taks A-B regardless of their values. Please help me
with this forumla!c Thanks alot!
 
Ad

Advertisements

G

Guest

Hi Arne,

=if(and(a1<>0,b1<>0),(a1-b1),0)

hth
regards from Brazil
Marcelo

"Arne Hegefors" escreveu:
 
Ad

Advertisements

H

Harald Staff

Hi
=IF(AND(A22<>0,B22<>0);A22-B22;"-")
or
=IF((A22*B22)<>0;A22-B22;"-")

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SUMPRODUCT question 13
Error when using the SUMXMY2 function 1
Excel 2002: Return blank when VLOOKUP on blank cells 2
SumProduct in VBA 3
Formula in VBasic 3
Formula Help 1
Delete Duplicate Info 1
Formula Help 1

Top