Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default summing based on multiple array criteria

For a simplification, I have the following:

CID=[32,33,34,35,36,37,38,39]

DATA:

A B C
21 .30 34000
21 .50 40000
32 .99 34000
32 .01 36000
33 .03 34000
33 .50 47010
42 .60 34000
42 .40 70100

I need to set up a formula to sum up the total in column "B" for all cases
where the value in column "A" is equal to any of the values in CID and the
value in column "C" is greater than 30000 and less than 40000. (Here, then
the answer would be 1.03)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default summing based on multiple array criteria

I've not tried this with arrays, so I'm not sure if it will work

=sumproduct(--(A1:A10=CID),--(C1:C10<40000),--(C1:C1040000),(B1:B10))

You may need to activate this with CTRL SHIFT ENTER

Let me know.


"koneil" wrote:

For a simplification, I have the following:

CID=[32,33,34,35,36,37,38,39]

DATA:

A B C
21 .30 34000
21 .50 40000
32 .99 34000
32 .01 36000
33 .03 34000
33 .50 47010
42 .60 34000
42 .40 70100

I need to set up a formula to sum up the total in column "B" for all cases
where the value in column "A" is equal to any of the values in CID and the
value in column "C" is greater than 30000 and less than 40000. (Here, then
the answer would be 1.03)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default summing based on multiple array criteria

Barb,

Thanks for the help but I'm afraid that forumal doesn't work - I just get a
#NA error when I try it.

Karen


"Barb Reinhardt" wrote:

I've not tried this with arrays, so I'm not sure if it will work

=sumproduct(--(A1:A10=CID),--(C1:C10<40000),--(C1:C1040000),(B1:B10))

You may need to activate this with CTRL SHIFT ENTER

Let me know.


"koneil" wrote:

For a simplification, I have the following:

CID=[32,33,34,35,36,37,38,39]

DATA:

A B C
21 .30 34000
21 .50 40000
32 .99 34000
32 .01 36000
33 .03 34000
33 .50 47010
42 .60 34000
42 .40 70100

I need to set up a formula to sum up the total in column "B" for all cases
where the value in column "A" is equal to any of the values in CID and the
value in column "C" is greater than 30000 and less than 40000. (Here, then
the answer would be 1.03)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default summing based on multiple array criteria

Do you have NA() in one of the columns of data? If so, which one?


"koneil" wrote:

Barb,

Thanks for the help but I'm afraid that forumal doesn't work - I just get a
#NA error when I try it.

Karen


"Barb Reinhardt" wrote:

I've not tried this with arrays, so I'm not sure if it will work

=sumproduct(--(A1:A10=CID),--(ISNUMBER(C1:C10),--(C1:C10<40000),--(C1:C1040000),(B1:B10))

You may need to activate this with CTRL SHIFT ENTER

Let me know.


"koneil" wrote:

For a simplification, I have the following:

CID=[32,33,34,35,36,37,38,39]

DATA:

A B C
21 .30 34000
21 .50 40000
32 .99 34000
32 .01 36000
33 .03 34000
33 .50 47010
42 .60 34000
42 .40 70100

I need to set up a formula to sum up the total in column "B" for all cases
where the value in column "A" is equal to any of the values in CID and the
value in column "C" is greater than 30000 and less than 40000. (Here, then
the answer would be 1.03)

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
Summing based on a range of criteria Mike Excel Discussion (Misc queries) 3 June 16th 09 07:05 PM
Summing a range based on value criteria WiFiMike2006 Excel Discussion (Misc queries) 2 March 1st 07 01:08 AM
Summing based on criteria jspizman Excel Worksheet Functions 1 July 20th 06 04:48 PM
Summing quantities based on like criteria? aburnce Excel Discussion (Misc queries) 5 May 4th 06 12:11 AM
Summing based on 2 criteria cubsfan Excel Discussion (Misc queries) 2 April 20th 06 04:21 PM


All times are GMT +1. The time now is 06:33 PM.

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

About Us

"It's about Microsoft Excel"