Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Countif using two columns?

I have a list of oil and gas wells by county and status. For example:

County Status
SEWARD SI
SEWARD Active
STEVENS Active
STEVENS SI
HASKELL Active
HASKELL SI
HASKELL Active

I want can easily use COUNITF to show that I have three SI (shut in)
wells and four active wells but I want to expand that data to show how
many SI and Active wells I have in each county. Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Countif using two columns?

Hi Scott,

Am Fri, 6 May 2011 08:19:09 -0700 (PDT) schrieb Scott Stedman:

I have a list of oil and gas wells by county and status. For example:

County Status
SEWARD SI
SEWARD Active
STEVENS Active
STEVENS SI
HASKELL Active
HASKELL SI
HASKELL Active

I want can easily use COUNITF to show that I have three SI (shut in)
wells and four active wells but I want to expand that data to show how
many SI and Active wells I have in each county. Is this possible?


try it with a Pivot-Table
or use formula for e.g. SEWARD and SI:
=SUMPRODUCT(--(A1:A100="SEWARD"),--(B1:B100="SI"))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Countif using two columns?

On May 6, 10:31*am, Claus Busch wrote:
Hi Scott,

Am Fri, 6 May 2011 08:19:09 -0700 (PDT) schrieb Scott Stedman:

I have a list of oil and gas wells by county and status. For example:


County * * Status
SEWARD * * SI
SEWARD * * Active
STEVENS * *Active
STEVENS * *SI
HASKELL * *Active
HASKELL * *SI
HASKELL * *Active


I want can easily use COUNITF to show that I have three SI (shut in)
wells and four active wells but I want to expand that data to show how
many SI and Active wells I have in each county. Is this possible?


try it with a Pivot-Table
or use formula for e.g. SEWARD and SI:
=SUMPRODUCT(--(A1:A100="SEWARD"),--(B1:B100="SI"))

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


Thanks for reply. Forgive my ignorance - what is the purpose of the --
you have in the function. I am an "advanced novice" and have not used
SUMPRODUCT much.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Countif using two columns?

Hi Scott,

Am Fri, 6 May 2011 12:15:06 -0700 (PDT) schrieb Scott Stedman:

Thanks for reply. Forgive my ignorance - what is the purpose of the --
you have in the function. I am an "advanced novice" and have not used
SUMPRODUCT much.


the -- changes the boolean values TRUE and FALSE to 1 and 0


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Countif using two columns?

On May 6, 2:29*pm, Claus Busch wrote:
Hi Scott,

Am Fri, 6 May 2011 12:15:06 -0700 (PDT) schrieb Scott Stedman:

Thanks for reply. Forgive my ignorance - what is the purpose of the --
you have in the function. I am an "advanced novice" and have not used
SUMPRODUCT much.


the -- changes the boolean values TRUE and FALSE to 1 and 0

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


Great. It works now. Thanks Claus.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Countif using two columns?

Hi Scott,

Am Fri, 6 May 2011 12:37:51 -0700 (PDT) schrieb Scott Stedman:

Great. It works now. Thanks Claus.


thank you for feeding back.
I would prefer to use PivotTable or in version 2007 or later COUNTIFS
Take a look:
http://www.claus-busch.de/Excel/Scott.zip


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 420
Default Countif using two columns?

You may want to consider using a pivottable, too.

And if you're using xl2007 or newer, there's a new =countifs() function that may
do what you want. See excel's help for more info.

On 05/06/2011 10:19, Scott Stedman wrote:
I have a list of oil and gas wells by county and status. For example:

County Status
SEWARD SI
SEWARD Active
STEVENS Active
STEVENS SI
HASKELL Active
HASKELL SI
HASKELL Active

I want can easily use COUNITF to show that I have three SI (shut in)
wells and four active wells but I want to expand that data to show how
many SI and Active wells I have in each county. Is this possible?


--
Dave Peterson
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
CountIf 2 columns Phippsy Excel Discussion (Misc queries) 3 April 26th 10 03:13 PM
COUNTIF for 2 columns b1llt Excel Worksheet Functions 7 March 29th 10 06:52 PM
COUNTIF - across 2 columns Rebekah Excel Worksheet Functions 11 November 9th 09 03:43 PM
countif in 2 columns Tonso Excel Discussion (Misc queries) 4 October 23rd 07 04:51 PM
Help with countif using two columns Vipulparbat Excel Worksheet Functions 4 August 18th 06 02:03 AM


All times are GMT +1. The time now is 05:01 AM.

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"