View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Logical functions If, And

=IF(AND(A20,B2=0),B2-A2,0)

and copy down

=SUMPRODUCT(--(A2:A200),--(B2:B200))

--
__________________________________
HTH

Bob

"GK" wrote in message
...
I am trying to do two things.

1). create a formula that compares one column of data to another. If the
cost is greater than zero and the amount paid is = to zero, then I want it
to
sum the variances.

2). create a formula that provides the number of occurances of number 1
above. ie. how many times is ther a cost with payment made.

Here is my table:

Cost Paid Variance
250 250 0
275 0 (275)
0 0 0
175 175 0
275 55 (220)
175 0 (175)

--
Thanks,
GK