Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 34
Default SumIF-multiple conditions/OR

I have a range of cells that I want to ck for a "Y", then in the next range
can be "STOP" or a value of "Go"? Kinda a mix of conditions.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default SumIF-multiple conditions/OR

A bit more detail, perhaps.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"GaryW" wrote in message
...
I have a range of cells that I want to ck for a "Y", then in the next range
can be "STOP" or a value of "Go"? Kinda a mix of conditions.


  #4   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumIF-multiple conditions/OR

You could get by with something like this in say, D1:
=SUMPRODUCT((A1:A6="Y")*(ISNUMBER(MATCH(B1:B6,{"Go ","Stop"},0)))*C1:C6)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"GaryW" wrote:
A B C
N Run 100
N Pause 50
Y Stop 50
C exit 25
Y Go 10
Z Exec 20

So I need to only select those row w/"Y" AND column B can be one of two values
STOP or Go. I will sum the values in Col C. THX.

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 34
Default SumIF-multiple conditions/OR

Does not appear to find the string values, "Go,Stop"....they are in the file.
Does the ISNUMBER expect a numeric value or can it be a string? Many Thanks.

"Max" wrote:

You could get by with something like this in say, D1:
=SUMPRODUCT((A1:A6="Y")*(ISNUMBER(MATCH(B1:B6,{"Go ","Stop"},0)))*C1:C6)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"GaryW" wrote:
A B C
N Run 100
N Pause 50
Y Stop 50
C exit 25
Y Go 10
Z Exec 20

So I need to only select those row w/"Y" AND column B can be one of two values
STOP or Go. I will sum the values in Col C. THX.



  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 102
Default SumIF-multiple conditions/OR

=Sumproduct(--(RngA="Y")*(RngB={"Stop","Go"})*RngC)


Regards
Robert McCurdy
"GaryW" wrote in message ...


"Don Guillett" wrote:

A bit more detail, perhaps.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"GaryW" wrote in message
...
I have a range of cells that I want to ck for a "Y", then in the next range
can be "STOP" or a value of "Go"? Kinda a mix of conditions.


Example:

A B C
N Run 100
N Pause 50
Y Stop 50
C exit 25
Y Go 10
Z Exec 20

So I need to only select those row w/"Y" AND column B can be one of two values
STOP or Go. I will sum the values in Col C. THX.

  #7   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumIF-multiple conditions/OR

Does not appear to find the string values, "Go,Stop"....they are in the
file.
Does the ISNUMBER expect a numeric value or can it be a string?


There could be extraneous white leading/trailing spaces in col B's data
throwing some apparent matches off. Try it with a TRIM to enhance matching,
viz.:
=SUMPRODUCT((A1:A6="Y")*(ISNUMBER(MATCH(TRIM(B1:B6 ),{"Go","Stop"},0)))*C1:C6)

ISNUMBER merely converts the matched array retuned into an array of
TRUEs/FALSEs, depending on whether the elements are numeric or non-numeric
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #8   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 34
Default SumIF-multiple conditions/OR

Thanks to All, Don/Max & Robert. Your solutions all worked and your effort
to send a reply is greatly appreciated.

"Robert McCurdy" wrote:

=Sumproduct(--(RngA="Y")*(RngB={"Stop","Go"})*RngC)


Regards
Robert McCurdy
"GaryW" wrote in message ...


"Don Guillett" wrote:

A bit more detail, perhaps.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"GaryW" wrote in message
...
I have a range of cells that I want to ck for a "Y", then in the next range
can be "STOP" or a value of "Go"? Kinda a mix of conditions.

Example:

A B C
N Run 100
N Pause 50
Y Stop 50
C exit 25
Y Go 10
Z Exec 20

So I need to only select those row w/"Y" AND column B can be one of two values
STOP or Go. I will sum the values in Col C. THX.


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
SUMIF with Multiple Conditions TexJen09 Excel Worksheet Functions 5 March 17th 08 03:39 AM
Sumif, And Statements - multiple conditions Des Excel Worksheet Functions 3 September 7th 07 01:48 AM
sumif with multiple conditions Slax Excel Worksheet Functions 5 April 12th 06 10:27 PM
sumif with multiple conditions Ray Excel Worksheet Functions 8 September 23rd 05 12:20 AM
sumif - multiple conditions J_Barn Excel Worksheet Functions 4 June 28th 05 11:55 PM


All times are GMT +1. The time now is 12:50 PM.

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"