Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 205
Default Two Condition - search

I am trying to pull value when two conditions are met.

want to count column "B" when it = "ETARC" and when column "J" is = "0" or a
negative number.

I have tried =COUNTIF(B11:B26,"=ETARC")+COUNTIF(J8:J24,""<0)
the formula is only pulling the column "B" infor and the same number for
column "J". My answer should be 6 for column "B" and 2 for column "J",
instead I am getting the same 6 for the entire data reading only column "B"
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Two Condition - search

xl2007 has a new =countifs() function that you can read about in Excel's help.

In any version of excel, you could use a formula like:

=sumproduct(--(b11:b26="etarc"),--(j11:j26<=0))

(I made the rows for both ranges the same.)

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

linda wrote:

I am trying to pull value when two conditions are met.

want to count column "B" when it = "ETARC" and when column "J" is = "0" or a
negative number.

I have tried =COUNTIF(B11:B26,"=ETARC")+COUNTIF(J8:J24,""<0)
the formula is only pulling the column "B" infor and the same number for
column "J". My answer should be 6 for column "B" and 2 for column "J",
instead I am getting the same 6 for the entire data reading only column "B"


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Two Condition - search

linda wrote:
I am trying to pull value when two conditions are met.

want to count column "B" when it = "ETARC" and when column "J" is = "0" or a
negative number.

I have tried =COUNTIF(B11:B26,"=ETARC")+COUNTIF(J8:J24,""<0)
the formula is only pulling the column "B" infor and the same number for
column "J". My answer should be 6 for column "B" and 2 for column "J",
instead I am getting the same 6 for the entire data reading only column "B"



You can also look he

http://www.contextures.com/xlFunctio...tml#SumProduct
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
search string with condition pburk Excel Discussion (Misc queries) 2 January 18th 09 02:20 AM
Search for Condition, Text based, Date Range, Occurrences NickNameGoesHere Excel Worksheet Functions 1 March 18th 08 04:11 PM
search for data matching some condition Michael Hahn Excel Worksheet Functions 2 July 18th 07 06:48 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
how to search in excel with condition David Excel Discussion (Misc queries) 1 February 8th 05 09:23 PM


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