A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum based on specific condition



 
 
Thread Tools Display Modes
  #1  
Old June 5th, 2007, 07:40 PM posted to microsoft.public.excel.worksheet.functions
Wendy
external usenet poster
 
Posts: 255
Default Sum based on specific condition

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
  #2  
Old June 5th, 2007, 07:45 PM posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
external usenet poster
 
Posts: 3,232
Default Sum based on specific condition

You should have asked

=SUMPRODUCT(--(A1:A10B1:B10),C1:C10)

adapt to fit accordingly to your range references





--
Regards,

Peo Sjoblom


"Wendy" wrote in message
...
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



  #3  
Old June 5th, 2007, 07:48 PM posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
external usenet poster
 
Posts: 3,232
Default Sum based on specific condition

Change that to

=SUMPRODUCT(--(A1:A10B1:B10),D110)


since you want to sum D


--
Regards,

Peo Sjoblom


"Peo Sjoblom" wrote in message
...
You should have asked

=SUMPRODUCT(--(A1:A10B1:B10),C1:C10)

adapt to fit accordingly to your range references





--
Regards,

Peo Sjoblom


"Wendy" wrote in message
...
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





  #4  
Old June 5th, 2007, 08:05 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Sum based on specific condition

A helper column would do it, Try in E1


=IF(A1B1,D1,0)

Drage down for the length of your data and sum the resultant column.

Mike

"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

  #5  
Old June 5th, 2007, 08:06 PM posted to microsoft.public.excel.worksheet.functions
Toppers
external usenet poster
 
Posts: 3,081
Default Sum based on specific condition

try:

=SUM(IF(A1:A9B1:B9,D19))

Enter with Ctrl+Shift+Enter

{} will appear round formula if entered correctly

HTH

"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

  #6  
Old June 5th, 2007, 08:07 PM posted to microsoft.public.excel.worksheet.functions
Duke Carey
external usenet poster
 
Posts: 1,027
Default Sum based on specific condition

=sumproduct(--(A1:a10B1:b10),d1:d10)

"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

  #7  
Old June 5th, 2007, 08:08 PM posted to microsoft.public.excel.worksheet.functions
Toppers
external usenet poster
 
Posts: 3,081
Default Sum based on specific condition

or ...

=SUMPRODUCT(--(A1:A9B1:B9),D19)

just Entered

"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

  #8  
Old June 5th, 2007, 09:22 PM posted to microsoft.public.excel.worksheet.functions
DazzaData
external usenet poster
 
Posts: 51
Default Sum based on specific condition

Hi Wendy,

To do this type the following (for rows 1-10, replace as required)

=SUMIF(A1:A10,""&B1:B10,D110)
when you have typed this instead of typing enter, hold CTRL, SHIFT and press
enter. This will put curly brackets round it, and tells excel it is an array
formula

hope this helps,

Cheers

Dazza

"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

  #9  
Old June 5th, 2007, 10:35 PM posted to microsoft.public.excel.worksheet.functions
JLatham
external usenet poster
 
Posts: 3,017
Default Sum based on specific condition

Given your ranges in use (change in the actual formula), this should work
=SUMPRODUCT(--(A1:A9B1:B9),--(D19))

I get 5907.71 (only 1st 2 entries have value in column A column B value).

"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

  #10  
Old June 5th, 2007, 10:37 PM posted to microsoft.public.excel.worksheet.functions
JLatham
external usenet poster
 
Posts: 3,017
Default Sum based on specific condition

A second way to do it would be to use a helper column in E. At E1 put:
=IF(A1B1,D1,0)
fill that formula down the sheet and then put a =SUM(E1:E9) formula down in
E10. Might be easier to understand that way, at the expense of using another
column.


"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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.