View Single Post
  #37   Report Post  
Posted to microsoft.public.excel.worksheet.functions
raromero raromero is offline
external usenet poster
 
Posts: 1
Default Sum based on specific condition

Try this:
Insert another column (E); this column shall contain the difference between
the values in (A) and (B); it is important that you subtract (B) from (A) and
not (A) from (B).
In the cell where you want to put the desired sum, type:
=sumif(E1:E9,"0",D1:D9)
In your example, it will yield 5,907.71.
Is there a chance that values in (A) and (B) will be equal? If no, this will
work.


(A) (B) (C) (D)
(E)
1. 6,942 292 0.81 5,614.84 =(A1-B1)
2. 317 0 0.92 292.87 =(A2-B2)
3. 6,207 20,374 7.64 47,421.48 =(A3-B3) and so on...
4. 417 17,588 5.84 2,435.28
5. 43,921 108,193 1.01 44,525.47
6. 5,974 15,883 3.11 18,579.14
7. 1,834 7,062 1.79 3,283.57
8. 665 733 2.13 1,416.76
9. 21,855 24,149 1.70 37,153.00



"Wendy" wrote:

Need help...I am trying to sum only those values in column (D)
whose corresponding value in column (A) is greater than the value in
column (B).

(A) (B) (C) (D)
1. 6,942 292 0.81 5,614.84
2. 317 0 0.92 292.87
3. 6,207 20,374 7.64 47,421.48
4. 417 17,588 5.84 2,435.28
5. 43,921 108,193 1.01 44,525.47
6. 5,974 15,883 3.11 18,579.14
7. 1,834 7,062 1.79 3,283.57
8. 665 733 2.13 1,416.76
9. 21,855 24,149 1.70 37,153.00

Any suggestions? I've been struggling with this for the past few days.


--
Wendy