Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Sumif - does not contain.

A few days ago, I asked about creating a sumif formula that adds the values
in one column for the cells in another column that contain the text string
"outlet".

I got these answers, both of which worked well.

=SUMPRODUCT(ISNUMBER(SEARCH("outlet",A2:A10))*B2:B 10)

=sumif(a:a,"*outlet*",b:b)

My question now is, how would I make this the inverse, i.e does NOT contain
€śoutlet€ť?
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Sumif - does not contain.

To create a SUMIF formula that adds the values in one column for the cells in another column that does NOT contain the text string "outlet", you can use the following formula:

Code:
=SUMPRODUCT(--(ISERROR(SEARCH("outlet",A2:A10)))*B2:B10)
Here's a step-by-step breakdown of the formula:
  1. ISERROR(SEARCH("outlet",A2:A10)): This part of the formula searches for the text string "outlet" in cells A2 to A10 and returns an error if it is not found. The ISERROR function then converts the error to a TRUE value.
  2. --(ISERROR(SEARCH("outlet",A2:A10))): The double negative (--) converts the TRUE value to a 1 and the FALSE value to a 0.
  3. (ISERROR(SEARCH("outlet",A2:A10)))*B2:B10: This part of the formula multiplies the 1s and 0s by the values in column B.
  4. SUMPRODUCT((ISERROR(SEARCH("outlet",A2:A10)))*B2:B 10): The SUMPRODUCT function adds up the values in the resulting array.

This formula should give you the sum of values in column B for the cells in column A that do NOT contain the text string "outlet".
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Sumif - does not contain.

=SUMPRODUCT(--(ISERROR(SEARCH("outlet",A2:A10))),B2:B10)


=SUMIF(A:A,"<*outlet*",B:B)


--


Regards,


Peo Sjoblom




"jerrymcm" wrote in message
...
A few days ago, I asked about creating a sumif formula that adds the values
in one column for the cells in another column that contain the text string
"outlet".

I got these answers, both of which worked well.

=SUMPRODUCT(ISNUMBER(SEARCH("outlet",A2:A10))*B2:B 10)

=sumif(a:a,"*outlet*",b:b)

My question now is, how would I make this the inverse, i.e does NOT
contain
"outlet"?



  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sumif - does not contain.

Just replace ISNUMBER with ISERROR in the sumproduct
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"jerrymcm" wrote:
A few days ago, I asked about creating a sumif formula that adds the values
in one column for the cells in another column that contain the text string
"outlet".

I got these answers, both of which worked well.

=SUMPRODUCT(ISNUMBER(SEARCH("outlet",A2:A10))*B2:B 10)

=sumif(a:a,"*outlet*",b:b)

My question now is, how would I make this the inverse, i.e does NOT contain
€śoutlet€ť?

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 for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Sumif KMH Excel Worksheet Functions 4 December 13th 06 11:04 AM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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