Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Counting multiple values (including blanks) in one column

Hi guys, I hope you can help me with what I think is a simple solution
but dammed if I can find the solution.... I have the following
spreadsheet

In column A are a list of names, there are duplicate of the same name
but each one is for the same person. eg 10 x Fred, 10 x Bob, 10 x Dave

In Column B is a list of company names, again some are duplicates or
similar eg Bobs Firm or Bobs Company

In column C are a list of codes including blanks eg AA, BB , CC, DD

I am struggling to find a formula which will do the following

Count the number of times that Fred appears, but where the company
does not include the word "bob" and only where there is a value of AA
or blank in column C.

Any suggestions gratefully received

Paul
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting multiple values (including blanks) in one column

Count the number of times that Fred appears, but where the company
does not include the word "bob" and only where there is a value of AA
or blank in column C.


In say, D2:
=SUMPRODUCT((A2:A10="Fred")*(B2:B10<"bob")*((C2:C 10="AA")+(C2:C10="")))
Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
wrote in message
...
Hi guys, I hope you can help me with what I think is a simple solution
but dammed if I can find the solution.... I have the following
spreadsheet

In column A are a list of names, there are duplicate of the same name
but each one is for the same person. eg 10 x Fred, 10 x Bob, 10 x Dave

In Column B is a list of company names, again some are duplicates or
similar eg Bobs Firm or Bobs Company

In column C are a list of codes including blanks eg AA, BB , CC, DD

I am struggling to find a formula which will do the following

Count the number of times that Fred appears, but where the company
does not include the word "bob" and only where there is a value of AA
or blank in column C.

Any suggestions gratefully received

Paul



  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting multiple values (including blanks) in one column

Refinement, closer interp on this line
does not include the word "bob" ..

implies that "bob" could be part of a text string in col B

Try in D2:
=SUMPRODUCT((A2:A10="Fred")*(ISERROR(SEARCH("bob", B2:B10))*((C2:C10="AA")+(C2:C10=""))))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Counting multiple values (including blanks) in one column

On Mar 7, 4:01 pm, "Max" wrote:
Refinement, closer interp on this line does not include the word "bob" ..

implies that "bob" could be part of a text string in col B

Try in D2:
=SUMPRODUCT((A2:A10="Fred")*(ISERROR(SEARCH("bob", B2:B10))*((C2:C10="AA")+(C2:C10=""))))
--
Max
Singaporehttp://savefile.com/projects/236895
xdemechanik
---


Max
Thanks for you advice, and yes your interpretation was correct, it
works a treat and does not count any appearance of the word "bob" as
part of a text string. It still does not count blanks in column C. Any
further advice gratefully received

Paul
  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting multiple values (including blanks) in one column

.. It still does not count blanks in column C

This part in the expression should have taken care of it:
..+(C2:C10="")..


Perhaps there are white space(s) in the cells,
these cells might appear "blank" but are not really so.

Try wrapping a TRIM around the range, viz try:
=SUMPRODUCT((A2:A10="Fred")*(B2:B10<"bob")*((C2:C 10="AA")+(TRIM(C2:C10)="")))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Counting multiple values (including blanks) in one column

On Mar 9, 2:34 am, "Max" wrote:
.. It still does not count blanks in column C


This part in the expression should have taken care of it:

..+(C2:C10="")..


Perhaps there are white space(s) in the cells,
these cells might appear "blank" but are not really so.

Try wrapping a TRIM around the range, viz try:
=SUMPRODUCT((A2:A10="Fred")*(B2:B10<"bob")*((C2:C 10="AA")+(TRIM(C2:C10)="")))
--
Max
Singaporehttp://savefile.com/projects/236895
xdemechanik
---


Max
you are a champion. I used the following and it works a treat
=SUMPRODUCT(('Grid data'!B9:B4563=A9)*(ISERROR(SEARCH("bob*",'Grid
data'!D9:D4563))*(('Grid data'!F9:F4563="aa")+(TRIM('Grid data'!
F9:F4563)=""))))

Thanks very much Max
Paul
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
Average not including Zeros/Blanks DaS Excel Worksheet Functions 8 October 17th 07 06:29 PM
Adding multiple values in one column based on multiple values of the same value (text) in another column [email protected] Excel Discussion (Misc queries) 1 May 16th 07 06:02 PM
lookup on Table including blanks - Nir Excel Worksheet Functions 7 October 31st 06 03:25 PM
If Then, not using values, or not counting blanks Need Help 123 Excel Worksheet Functions 8 July 20th 05 06:23 PM
Counting numbers in a column without including others kim11757 Excel Worksheet Functions 1 January 6th 05 10:14 PM


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