PC Review


Reply
Thread Tools Rate Thread

Countif using two columns?

 
 
Scott Stedman
Guest
Posts: n/a
 
      6th May 2011
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?
 
Reply With Quote
 
 
 
 
Claus Busch
Guest
Posts: n/a
 
      6th May 2011
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
 
Reply With Quote
 
Scott Stedman
Guest
Posts: n/a
 
      6th May 2011
On May 6, 10:31*am, Claus Busch <claus_bu...@t-online.de> 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.
 
Reply With Quote
 
Claus Busch
Guest
Posts: n/a
 
      6th May 2011
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
 
Reply With Quote
 
Scott Stedman
Guest
Posts: n/a
 
      6th May 2011
On May 6, 2:29*pm, Claus Busch <claus_bu...@t-online.de> 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.
 
Reply With Quote
 
Claus Busch
Guest
Posts: n/a
 
      6th May 2011
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
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      7th May 2011
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF with 2 columns J.A.1975 Microsoft Excel Worksheet Functions 2 28th Apr 2011 03:36 PM
Countif for 2 columns earlfj Microsoft Excel Worksheet Functions 3 27th Sep 2009 05:42 AM
countif in 2 columns Tonso Microsoft Excel Misc 4 23rd Oct 2007 04:51 PM
countif with two columns? viveleroi0 Microsoft Excel Worksheet Functions 1 30th Aug 2004 07:58 PM
Re: countif from two columns Arvi Laanemets Microsoft Excel Worksheet Functions 0 30th Jul 2003 07:08 AM


Features
 

Advertising
 

Newsgroups
 


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