ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count if cetain text is in another column, same row. (https://www.excelbanter.com/excel-worksheet-functions/181715-count-if-cetain-text-another-column-same-row.html)

bhammer

Count if cetain text is in another column, same row.
 
Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad

Pete_UK

Count if cetain text is in another column, same row.
 
Try this:

=SUMPRODUCT((A1:A100="X")*(B1:B100="Bob"))

=SUMPRODUCT((A1:A100="X")*(B1:B100="John"))

Adjust the ranges to suit your data.

Hope this helps.

Pete

On Mar 28, 6:36*pm, bhammer wrote:
Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad



Lars-Åke Aspelin[_2_]

Count if cetain text is in another column, same row.
 
On Fri, 28 Mar 2008 11:36:41 -0700 (PDT), bhammer
wrote:

Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad


Try this:

=SUMPRODUCT((A:A="X")*(B:B="John"))

Hope this helps / Lars-Åke


Rick Rothstein \(MVP - VB\)[_253_]

Count if cetain text is in another column, same row.
 
Here is a formula for John...

=SUMPRODUCT((A1:A100="X")*(B1:B100="John"))

and for Bob...

=SUMPRODUCT((A1:A100="X")*(B1:B100="Bob"))

Rick


"bhammer" wrote in message
...
Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad



PCLIVE

Count if cetain text is in another column, same row.
 
For Bob:
=SUMPRODUCT(--(A2:A100="X"),--(B2:B100="Bob"))

For John
=SUMPRODUCT(--(A2:A100="X"),--(B2:B100="John"))

HTH,
Paul

--

"bhammer" wrote in message
...
Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad




Pete_UK

Count if cetain text is in another column, same row.
 
Lars,

you can only use full-column references in XL2007 - the OP stated
XL2003.

Pete

On Mar 28, 6:41*pm, Lars-Åke Aspelin
wrote:
On Fri, 28 Mar 2008 11:36:41 -0700 (PDT), bhammer

wrote:
Excel 2003,


Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad


Try this:

=SUMPRODUCT((A:A="X")*(B:B="John"))

Hope this helps / Lars-Åke



Lars-Åke Aspelin[_2_]

Count if cetain text is in another column, same row.
 
On Fri, 28 Mar 2008 11:47:31 -0700 (PDT), Pete_UK
wrote:

Lars,

you can only use full-column references in XL2007 - the OP stated
XL2003.

Pete

OK, thanks for telling.

Lars-Åke



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com