Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
msbutton27
 
Posts: n/a
Default How to add entires in column based on another column...

I have two columns in a spreadsheet, and I need to count the entires in
column two depending on column 1...For example:

Column 1 Column 2
Mike Yes
Mike No
Tom Yes
Mike Yes
Tom No

So In the above example I need to add all the Yes's that Mike has, not all
the yes's just the ones associated to the row Mike is on...

Any ideas, or does this make sense.

....Mike
  #2   Report Post  
bj
 
Posts: n/a
Default

Sumproduct() will work
=sumproduct(--(column1range="Mike"),--(Column2range="Yes"))
the --( changes the logical true false to a 1,0 numeric response.
the arrays in each section must be the same size but cannot be the shorthand
for full rows or columns (not A:A)

"msbutton27" wrote:

I have two columns in a spreadsheet, and I need to count the entires in
column two depending on column 1...For example:

Column 1 Column 2
Mike Yes
Mike No
Tom Yes
Mike Yes
Tom No

So In the above example I need to add all the Yes's that Mike has, not all
the yes's just the ones associated to the row Mike is on...

Any ideas, or does this make sense.

...Mike

  #3   Report Post  
msbutton27
 
Posts: n/a
Default

This is what I just tried and it fails - did I do something wrong:

=sumproduct(--(RAW Data'!D1:D400="Mike"),--(RAW Data'!K1:K400="yes"))

I am typing this into the formula bar in Excel - sorry but I am not that
advance with Excel, there afraid I am missing something...

THanks for any help,
Mike

"bj" wrote:

Sumproduct() will work
=sumproduct(--(column1range="Mike"),--(Column2range="Yes"))
the --( changes the logical true false to a 1,0 numeric response.
the arrays in each section must be the same size but cannot be the shorthand
for full rows or columns (not A:A)

"msbutton27" wrote:

I have two columns in a spreadsheet, and I need to count the entires in
column two depending on column 1...For example:

Column 1 Column 2
Mike Yes
Mike No
Tom Yes
Mike Yes
Tom No

So In the above example I need to add all the Yes's that Mike has, not all
the yes's just the ones associated to the row Mike is on...

Any ideas, or does this make sense.

...Mike

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

You dropped a couple of single quotes:

=sumproduct(--('RAW Data'!D1:D400="Mike"),--('RAW Data'!K1:K400="yes"))

(both before "RAW".)

msbutton27 wrote:

This is what I just tried and it fails - did I do something wrong:

=sumproduct(--(RAW Data'!D1:D400="Mike"),--(RAW Data'!K1:K400="yes"))

I am typing this into the formula bar in Excel - sorry but I am not that
advance with Excel, there afraid I am missing something...

THanks for any help,
Mike

"bj" wrote:

Sumproduct() will work
=sumproduct(--(column1range="Mike"),--(Column2range="Yes"))
the --( changes the logical true false to a 1,0 numeric response.
the arrays in each section must be the same size but cannot be the shorthand
for full rows or columns (not A:A)

"msbutton27" wrote:

I have two columns in a spreadsheet, and I need to count the entires in
column two depending on column 1...For example:

Column 1 Column 2
Mike Yes
Mike No
Tom Yes
Mike Yes
Tom No

So In the above example I need to add all the Yes's that Mike has, not all
the yes's just the ones associated to the row Mike is on...

Any ideas, or does this make sense.

...Mike


--

Dave Peterson
  #5   Report Post  
msbutton27
 
Posts: n/a
Default

It works like a charm....

Thanks,
Mike

"Dave Peterson" wrote:

You dropped a couple of single quotes:

=sumproduct(--('RAW Data'!D1:D400="Mike"),--('RAW Data'!K1:K400="yes"))

(both before "RAW".)

msbutton27 wrote:

This is what I just tried and it fails - did I do something wrong:

=sumproduct(--(RAW Data'!D1:D400="Mike"),--(RAW Data'!K1:K400="yes"))

I am typing this into the formula bar in Excel - sorry but I am not that
advance with Excel, there afraid I am missing something...

THanks for any help,
Mike

"bj" wrote:

Sumproduct() will work
=sumproduct(--(column1range="Mike"),--(Column2range="Yes"))
the --( changes the logical true false to a 1,0 numeric response.
the arrays in each section must be the same size but cannot be the shorthand
for full rows or columns (not A:A)

"msbutton27" wrote:

I have two columns in a spreadsheet, and I need to count the entires in
column two depending on column 1...For example:

Column 1 Column 2
Mike Yes
Mike No
Tom Yes
Mike Yes
Tom No

So In the above example I need to add all the Yes's that Mike has, not all
the yes's just the ones associated to the row Mike is on...

Any ideas, or does this make sense.

...Mike


--

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
Conditional format based on data from another column Ellie Excel Discussion (Misc queries) 3 May 14th 08 05:23 PM
Program Column B to record numerical range based on number in colm Nikole Excel Discussion (Misc queries) 2 August 17th 05 08:37 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
Hide column based on data value Jay Excel Discussion (Misc queries) 1 March 25th 05 01:40 AM
Formula to compare multiple rows values based on another column? Murph Excel Worksheet Functions 4 February 21st 05 02:44 AM


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

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"