Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JRD JRD is offline
external usenet poster
 
Posts: 60
Default Avoiding counting the same cell twice

Please help, I'm stuck.

How can I count the number of cells containing certain words but avoid
counting the same cell twice.

E.g.

Column A
A
B
C A
B A
A B
B
A

How do I count the number of cells containing A added to the number of cells
that contain B without double counting those that contain A and B

The answer in the above example should be 6 (NOT 7)

Many thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Avoiding counting the same cell twice

=SUMPRODUCT(--(LEFT(A1:A7,1)={"A","B"}))

---------------
mama no teeth

"JRD" wrote:

Please help, I'm stuck.

How can I count the number of cells containing certain words but avoid
counting the same cell twice.

E.g.

Column A
A
B
C A
B A
A B
B
A

How do I count the number of cells containing A added to the number of cells
that contain B without double counting those that contain A and B

The answer in the above example should be 6 (NOT 7)

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Avoiding counting the same cell twice

One way...

If you download and install the latest version of the morefunc.xll
add-in, you can invoke:

=SUM((REGEX.SUBSTITUTE(UPPER(A2:A8),"[ AB]","")="")+0)-COUNTBLANK(A2:A8)

which must be confirmed with control+shift+enter, not just with enter.

JRD wrote:
Please help, I'm stuck.

How can I count the number of cells containing certain words but avoid
counting the same cell twice.

E.g.

Column A
A
B
C A
B A
A B
B
A

How do I count the number of cells containing A added to the number of cells
that contain B without double counting those that contain A and B

The answer in the above example should be 6 (NOT 7)

Many thanks

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
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


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