Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default sum if one or another criteria

I've been trying to figure this out on my own based on other similar posts
but I think I just don't understand array formulas. Anyway... I want to sum a
range of cells if 1 of 2 possible criteria are met within a different range
of cells.
Example:
RowA RowB RowC
Col1 P S W
Col2 4 2 1

Sumif(A1:C1,"P" OR "S", A2:C2)

It's the OR that I can't figure out.

Thanks a Bunch!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default sum if one or another criteria

Try

=SUMPRODUCT((A1:C1={P",S"})*(A2:C2))


--

HTH

Bob

"parls" wrote in message
...
I've been trying to figure this out on my own based on other similar posts
but I think I just don't understand array formulas. Anyway... I want to
sum a
range of cells if 1 of 2 possible criteria are met within a different
range
of cells.
Example:
RowA RowB RowC
Col1 P S W
Col2 4 2 1

Sumif(A1:C1,"P" OR "S", A2:C2)

It's the OR that I can't figure out.

Thanks a Bunch!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default sum if one or another criteria

=SUM(SUMIF(A1:C1,{"P","S"},A2:C2))


"parls" wrote:

I've been trying to figure this out on my own based on other similar posts
but I think I just don't understand array formulas. Anyway... I want to sum a
range of cells if 1 of 2 possible criteria are met within a different range
of cells.
Example:
RowA RowB RowC
Col1 P S W
Col2 4 2 1

Sumif(A1:C1,"P" OR "S", A2:C2)

It's the OR that I can't figure out.

Thanks a Bunch!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default sum if one or another criteria

Awesome! That worked perfectly. For some reason when I tried to use the
sumproduct formula it returned "N/A".

"Teethless mama" wrote:

=SUM(SUMIF(A1:C1,{"P","S"},A2:C2))


"parls" wrote:

I've been trying to figure this out on my own based on other similar posts
but I think I just don't understand array formulas. Anyway... I want to sum a
range of cells if 1 of 2 possible criteria are met within a different range
of cells.
Example:
RowA RowB RowC
Col1 P S W
Col2 4 2 1

Sumif(A1:C1,"P" OR "S", A2:C2)

It's the OR that I can't figure out.

Thanks a Bunch!

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
Query criteria based on a changing criteria list bwilk77 Excel Discussion (Misc queries) 2 May 27th 09 04:03 PM
Count how many criteria in a column match criteria in another colu Charles Stover Excel Discussion (Misc queries) 3 March 6th 09 09:39 PM
=DMIN(database,field,criteria) question about criteria Dummy Excel Discussion (Misc queries) 2 April 16th 07 08:02 PM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 11:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 09:33 AM


All times are GMT +1. The time now is 12:44 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"