Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Countif and multiple columns to validate

ok in column T I have a value that needs to be counted if it matches a name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Countif and multiple columns to validate

Try this:

=SUMPRODUCT(--(T1:T10=FirstCriteria),--(P1:P10=SecondCriteria))

HTH,
Paul

"ouch" wrote in message
...
ok in column T I have a value that needs to be counted if it matches a
name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default Countif and multiple columns to validate

=SUM(IF(AND(MATCH(T1,NameField1,0),MATCH(T1,NameFi eld2,0)),1,0))

See if this works... Im thinking that you are matching names so summing the
value 1 is just like counting. This formula if you put the right references
in it should count only the values that match both requirements. LMK if you
have any other questions.

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Countif and multiple columns to validate

Did you test your formula?


"AKphidelt" wrote:

=SUM(IF(AND(MATCH(T1,NameField1,0),MATCH(T1,NameFi eld2,0)),1,0))

See if this works... Im thinking that you are matching names so summing the
value 1 is just like counting. This formula if you put the right references
in it should count only the values that match both requirements. LMK if you
have any other questions.

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Countif and multiple columns to validate

Ok I tried both formulas and niether seem to work. Match stops at the first
instance found and the other returns nothing but False even if the criteria
matches. Perhaps it's meant for numbers only?

Any other ideas or should I make a VB macro to handle this?

Also this formula needs to run from a single cell.

Thanks for the help so far folks!

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Countif and multiple columns to validate

Give us an example of your data in columns P and T, in addition to what type
of output you're looking for.


"ouch" wrote in message
...
Ok I tried both formulas and niether seem to work. Match stops at the
first
instance found and the other returns nothing but False even if the
criteria
matches. Perhaps it's meant for numbers only?

Any other ideas or should I make a VB macro to handle this?

Also this formula needs to run from a single cell.

Thanks for the help so far folks!

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a
name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Countif and multiple columns to validate

ok, heres an example:
P T
hot water
hot milk
hot water
cold water
hot milk
cold milk
cold milk
hot water

So in this example I would want to know how many occurances of hot water
there was and how many times Cold milk occured in this list. The results
would then be on a seperate worksheet with a label above the values found.

Sounds simple enough, but... :)

"PCLIVE" wrote:

Give us an example of your data in columns P and T, in addition to what type
of output you're looking for.


"ouch" wrote in message
...
Ok I tried both formulas and niether seem to work. Match stops at the
first
instance found and the other returns nothing but False even if the
criteria
matches. Perhaps it's meant for numbers only?

Any other ideas or should I make a VB macro to handle this?

Also this formula needs to run from a single cell.

Thanks for the help so far folks!

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a
name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Countif and multiple columns to validate

=SUMPRODUCT(--(P_Range="hot"),--(T_Range="water"))

replace the fictional P and T ranges in my example with your real ranges
i.e. A2:A100 etc


--
Regards,

Peo Sjoblom


"ouch" wrote in message
...
ok, heres an example:
P T
hot water
hot milk
hot water
cold water
hot milk
cold milk
cold milk
hot water

So in this example I would want to know how many occurances of hot water
there was and how many times Cold milk occured in this list. The results
would then be on a seperate worksheet with a label above the values found.

Sounds simple enough, but... :)

"PCLIVE" wrote:

Give us an example of your data in columns P and T, in addition to what
type
of output you're looking for.


"ouch" wrote in message
...
Ok I tried both formulas and niether seem to work. Match stops at the
first
instance found and the other returns nothing but False even if the
criteria
matches. Perhaps it's meant for numbers only?

Any other ideas or should I make a VB macro to handle this?

Also this formula needs to run from a single cell.

Thanks for the help so far folks!

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a
name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.






  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Countif and multiple columns to validate

Sumproduct should do what you need.

=SUMPRODUCT(--(A2:A9="cold"),--(B2:B9="milk"))

If you need to reference a different sheet:
=SUMPRODUCT(--(Sheet3!A2:A9="cold"),--(Sheet3!B2:B9="milk"))

If you want to references a different workbook:
=SUMPRODUCT(--([Book1.xls]Sheet3!$A$2:$A$9="cold"),--([Book1.xls]Sheet3!$B2:B9="milk"))

Good luck,
Paul

"ouch" wrote in message
...
ok, heres an example:
P T
hot water
hot milk
hot water
cold water
hot milk
cold milk
cold milk
hot water

So in this example I would want to know how many occurances of hot water
there was and how many times Cold milk occured in this list. The results
would then be on a seperate worksheet with a label above the values found.

Sounds simple enough, but... :)

"PCLIVE" wrote:

Give us an example of your data in columns P and T, in addition to what
type
of output you're looking for.


"ouch" wrote in message
...
Ok I tried both formulas and niether seem to work. Match stops at the
first
instance found and the other returns nothing but False even if the
criteria
matches. Perhaps it's meant for numbers only?

Any other ideas or should I make a VB macro to handle this?

Also this formula needs to run from a single cell.

Thanks for the help so far folks!

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a
name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.






  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Countif and multiple columns to validate

I redesigned the sheet a bit to avoid this problem. It's a bit simpler and
strait forward now.

thanks for trying though!

"Peo Sjoblom" wrote:

=SUMPRODUCT(--(P_Range="hot"),--(T_Range="water"))

replace the fictional P and T ranges in my example with your real ranges
i.e. A2:A100 etc


--
Regards,

Peo Sjoblom


"ouch" wrote in message
...
ok, heres an example:
P T
hot water
hot milk
hot water
cold water
hot milk
cold milk
cold milk
hot water

So in this example I would want to know how many occurances of hot water
there was and how many times Cold milk occured in this list. The results
would then be on a seperate worksheet with a label above the values found.

Sounds simple enough, but... :)

"PCLIVE" wrote:

Give us an example of your data in columns P and T, in addition to what
type
of output you're looking for.


"ouch" wrote in message
...
Ok I tried both formulas and niether seem to work. Match stops at the
first
instance found and the other returns nothing but False even if the
criteria
matches. Perhaps it's meant for numbers only?

Any other ideas or should I make a VB macro to handle this?

Also this formula needs to run from a single cell.

Thanks for the help so far folks!

"ouch" wrote:

ok in column T I have a value that needs to be counted if it matches a
name.
However it also needs to match a name in column P.

Anyideas on how I could accomplish this?

thanks in advance.






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 for multiple columns John English Excel Discussion (Misc queries) 2 February 1st 07 12:31 AM
Countif Using Multiple Columns Rob E Excel Worksheet Functions 4 January 24th 07 08:47 AM
Sum or Countif over Multiple Columns AndyO_UK Excel Worksheet Functions 3 December 1st 06 02:48 PM
using a countif with multiple columns [email protected] Excel Worksheet Functions 3 August 22nd 06 04:17 AM
Using Countif on multiple columns ingeman Excel Worksheet Functions 1 July 17th 06 06:08 AM


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