Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 262
Default How can I count based on 2 values?

I have a sheet with 2 columns. One column the user enters one of three
possible values in the first column. There is a piece of code in the
worksheet that based on their selection the second column will have a
validation list, relating to what they have entered in column 1.

What I want to do is count the number of times each option comes up in
column 1. That part is fine, I simply use the COUNTIF command. But one of
the possible entries is the word "Other". I only want to count the "Other"
entries if it's corresponding entry in column 2 dose not equal "Journey Home"

Can this be done?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default How can I count based on 2 values?

=SUMPRODUCT(--(A2:A20="Other"),--(B2:B20="Journey Home")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Keith" wrote in message
...
I have a sheet with 2 columns. One column the user enters one of three
possible values in the first column. There is a piece of code in the
worksheet that based on their selection the second column will have a
validation list, relating to what they have entered in column 1.

What I want to do is count the number of times each option comes up in
column 1. That part is fine, I simply use the COUNTIF command. But one of
the possible entries is the word "Other". I only want to count the "Other"
entries if it's corresponding entry in column 2 dose not equal "Journey

Home"

Can this be done?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 262
Default How can I count based on 2 values?

Thanks for that it works a treat. Now I just need to work out how it works.

By the way, you forgot the second closing bracket at the end of the command.
:-)

Thanks again

Keith

"Bob Phillips" wrote:

=SUMPRODUCT(--(A2:A20="Other"),--(B2:B20="Journey Home")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Keith" wrote in message
...
I have a sheet with 2 columns. One column the user enters one of three
possible values in the first column. There is a piece of code in the
worksheet that based on their selection the second column will have a
validation list, relating to what they have entered in column 1.

What I want to do is count the number of times each option comes up in
column 1. That part is fine, I simply use the COUNTIF command. But one of
the possible entries is the word "Other". I only want to count the "Other"
entries if it's corresponding entry in column 2 dose not equal "Journey

Home"

Can this be done?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default How can I count based on 2 values?

So I did. See http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a
detailed explanation.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Keith" wrote in message
...
Thanks for that it works a treat. Now I just need to work out how it

works.

By the way, you forgot the second closing bracket at the end of the

command.
:-)

Thanks again

Keith

"Bob Phillips" wrote:

=SUMPRODUCT(--(A2:A20="Other"),--(B2:B20="Journey Home")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Keith" wrote in message
...
I have a sheet with 2 columns. One column the user enters one of three
possible values in the first column. There is a piece of code in the
worksheet that based on their selection the second column will have a
validation list, relating to what they have entered in column 1.

What I want to do is count the number of times each option comes up in
column 1. That part is fine, I simply use the COUNTIF command. But

one of
the possible entries is the word "Other". I only want to count the

"Other"
entries if it's corresponding entry in column 2 dose not equal

"Journey
Home"

Can this be done?






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default How can I count based on 2 values?


" column 2 dose not equal "Journey Home"---
col 1 = col A
col 2 = col B

I suggest you start Now to explore the SUM array formula....

=SUM((a2:a100="Other")*(b2:b100<"Journey Home"))
on edit mode, press control-shift-enter
excel will validate the array formula.
it will look like this..
{=SUM((a2:a100="Other")*(b2:b100<"Journey Home"))}

mine driller


"Keith" wrote:

I have a sheet with 2 columns. One column the user enters one of three
possible values in the first column. There is a piece of code in the
worksheet that based on their selection the second column will have a
validation list, relating to what they have entered in column 1.

What I want to do is count the number of times each option comes up in
column 1. That part is fine, I simply use the COUNTIF command. But one of
the possible entries is the word "Other". I only want to count the "Other"
entries if it's corresponding entry in column 2 dose not equal "Journey Home"

Can this be done?



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
Count values with conditions - again ElvisS Excel Discussion (Misc queries) 2 August 24th 06 12:22 PM
How to Search, Count, Match and Post Values vincentws Excel Worksheet Functions 4 August 17th 06 05:20 PM
Count data based on past dates JimDandy Excel Worksheet Functions 7 June 28th 06 03:59 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
If I have X,Y data how do I sum the Y values using a set of bins based on x values ScottBerger Excel Worksheet Functions 1 November 16th 04 11:48 PM


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

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"