#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Formula Problem

I am trying to sum one column when another column = a certain value and when
a 2nd column = a certain value. Here is the formula I have so far. However,
it is summing everything in column D. Any suggestions would be greatly
appreciated, even if it is a completely different formula.

=IF(SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1)),SUM($D$1:$D$20000),0)

Thanks,
Clint
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Formula Problem

SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1),$D$1:$D$20000)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"cherman" wrote in message
...
I am trying to sum one column when another column = a certain value and
when
a 2nd column = a certain value. Here is the formula I have so far.
However,
it is summing everything in column D. Any suggestions would be greatly
appreciated, even if it is a completely different formula.

=IF(SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1)),SUM($D$1:$D$20000),0)

Thanks,
Clint


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Formula Problem

Try

=SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1),($D$1:$D$20000))

Hope this helps,

Hutch

"cherman" wrote:

I am trying to sum one column when another column = a certain value and when
a 2nd column = a certain value. Here is the formula I have so far. However,
it is summing everything in column D. Any suggestions would be greatly
appreciated, even if it is a completely different formula.

=IF(SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1)),SUM($D$1:$D$20000),0)

Thanks,
Clint

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Formula Problem

Thank you very much! That was exactly what I was looking for.

One last question. I tried to replace the column references as they are with
total column references, using A:A instread of $A$1:$A$20000, but I get a
#NUM! error. Can you tell me how to do this?

Thanks again!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1),($D$1:$D$20000))

Hope this helps,

Hutch

"cherman" wrote:

I am trying to sum one column when another column = a certain value and when
a 2nd column = a certain value. Here is the formula I have so far. However,
it is summing everything in column D. Any suggestions would be greatly
appreciated, even if it is a completely different formula.

=IF(SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1)),SUM($D$1:$D$20000),0)

Thanks,
Clint

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Formula Problem

You must be using XL2003. SUMPRODCT() will return an error if you reference
the entire column. Instead try

If you have headers in row 1, you could use:
--($A$2:$A$65536="something"), ...

or just ignore the final row

--($A$1:$A$65535="something"),



--
Jacob


"cherman" wrote:

Thank you very much! That was exactly what I was looking for.

One last question. I tried to replace the column references as they are with
total column references, using A:A instread of $A$1:$A$20000, but I get a
#NUM! error. Can you tell me how to do this?

Thanks again!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1),($D$1:$D$20000))

Hope this helps,

Hutch

"cherman" wrote:

I am trying to sum one column when another column = a certain value and when
a 2nd column = a certain value. Here is the formula I have so far. However,
it is summing everything in column D. Any suggestions would be greatly
appreciated, even if it is a completely different formula.

=IF(SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1)),SUM($D$1:$D$20000),0)

Thanks,
Clint



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Formula Problem

You can't use entire columns as range references with SUMPRODUCT unless
you're using Excel 2007. Use a smaller specifc range. You can use up to the
entire column minus 1 row:

A1:A65535
A2:A65536

However, *every* cell referenced in SUMPRODUCT (and other array formulas)
will be calculated. If don't have data in *every* one of those cells then
you're wasting calculation resources. For example, your data goes to A10000.
If you use A2:A65536 as the range in the formula with A10001 to A65536 being
empty cells, you're wasting resources by calculating 55536 empty cells.

--
Biff
Microsoft Excel MVP


"cherman" wrote in message
...
Thank you very much! That was exactly what I was looking for.

One last question. I tried to replace the column references as they are
with
total column references, using A:A instread of $A$1:$A$20000, but I get a
#NUM! error. Can you tell me how to do this?

Thanks again!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1),($D$1:$D$20000))

Hope this helps,

Hutch

"cherman" wrote:

I am trying to sum one column when another column = a certain value and
when
a 2nd column = a certain value. Here is the formula I have so far.
However,
it is summing everything in column D. Any suggestions would be greatly
appreciated, even if it is a completely different formula.

=IF(SUMPRODUCT(--($A$1:$A$20000=I5606),--(E$1:E$20000=1)),SUM($D$1:$D$20000),0)

Thanks,
Clint



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula problem puiuluipui Excel Discussion (Misc queries) 3 September 18th 09 10:13 PM
Problem formula Wiggy Excel Discussion (Misc queries) 3 May 6th 08 06:55 PM
Formula Problem Confused at Work Excel Discussion (Misc queries) 4 April 11th 08 10:18 PM
Formula Problem JoeH New Users to Excel 3 July 4th 07 08:07 PM
formula Problem Little Willie Excel Discussion (Misc queries) 2 August 17th 05 04:42 AM


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"