Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default CountIF or COUNTA for specific text

I'm trying to count specific cells in my column of text. The CountA would
work except there are some cells that I need excluded. These cells all begin
with the word "assist" so I tried the following function which isn't given my
the expected results.

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

taking the small example below, I need it to calculate the answer 3 but it's
calculating 4 (4 is answer of just the COUNTA portion so I don't think it's
doing anything with my subtraction and COUNTIF portion)

MA-90
blank
MB-90
MA-90
blank
assist MB-90

This spreadsheet is a grid of sorts so I need the cells with assist to stay
in this column; otherwise, I would separate the data and count again but that
won't work in this case.

Hope this all make sense. Thanks for any assistance you can provide.
Marcia
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default CountIF or COUNTA for specific text

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

There's nothing wrong with your formula so if the result is incorrect you
may have unseen characters in those cells you think are blank. Are there
formulas in these cells that might return a formula blank ("") ? COUNTA will
count formula blanks.

Try one of these and see what happens:

=COUNTIF(F7:F36," ")-COUNTIF(F7:F36,"assist*")

=SUMPRODUCT(--(LEN(TRIM(F7:F36))0))-COUNTIF(F7:F36,"assist*")


--
Biff
Microsoft Excel MVP


"Office user" wrote in message
...
I'm trying to count specific cells in my column of text. The CountA would
work except there are some cells that I need excluded. These cells all
begin
with the word "assist" so I tried the following function which isn't given
my
the expected results.

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

taking the small example below, I need it to calculate the answer 3 but
it's
calculating 4 (4 is answer of just the COUNTA portion so I don't think
it's
doing anything with my subtraction and COUNTIF portion)

MA-90
blank
MB-90
MA-90
blank
assist MB-90

This spreadsheet is a grid of sorts so I need the cells with assist to
stay
in this column; otherwise, I would separate the data and count again but
that
won't work in this case.

Hope this all make sense. Thanks for any assistance you can provide.
Marcia



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default CountIF or COUNTA for specific text

Thank you for your help. I tried your other 2 formulas and am still getting
my unexpected results. There are no formulas at all in my blank cells but I
went through each cell again anyway and cleared everything (Edit menu). I'm
guessing at this point it must have to do with my data but I'm not sure where.

Thanks for the help,
Marcia


"T. Valko" wrote:

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")


There's nothing wrong with your formula so if the result is incorrect you
may have unseen characters in those cells you think are blank. Are there
formulas in these cells that might return a formula blank ("") ? COUNTA will
count formula blanks.

Try one of these and see what happens:

=COUNTIF(F7:F36," ")-COUNTIF(F7:F36,"assist*")

=SUMPRODUCT(--(LEN(TRIM(F7:F36))0))-COUNTIF(F7:F36,"assist*")


--
Biff
Microsoft Excel MVP


"Office user" wrote in message
...
I'm trying to count specific cells in my column of text. The CountA would
work except there are some cells that I need excluded. These cells all
begin
with the word "assist" so I tried the following function which isn't given
my
the expected results.

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

taking the small example below, I need it to calculate the answer 3 but
it's
calculating 4 (4 is answer of just the COUNTA portion so I don't think
it's
doing anything with my subtraction and COUNTIF portion)

MA-90
blank
MB-90
MA-90
blank
assist MB-90

This spreadsheet is a grid of sorts so I need the cells with assist to
stay
in this column; otherwise, I would separate the data and count again but
that
won't work in this case.

Hope this all make sense. Thanks for any assistance you can provide.
Marcia




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default CountIF or COUNTA for specific text

Viola! I found it. I went through each cell again and discovered one of
them had a space before my word "assist" so it threw off the COUNTIF. Thanks
again for your help.
Marcia


"T. Valko" wrote:

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")


There's nothing wrong with your formula so if the result is incorrect you
may have unseen characters in those cells you think are blank. Are there
formulas in these cells that might return a formula blank ("") ? COUNTA will
count formula blanks.

Try one of these and see what happens:

=COUNTIF(F7:F36," ")-COUNTIF(F7:F36,"assist*")

=SUMPRODUCT(--(LEN(TRIM(F7:F36))0))-COUNTIF(F7:F36,"assist*")


--
Biff
Microsoft Excel MVP


"Office user" wrote in message
...
I'm trying to count specific cells in my column of text. The CountA would
work except there are some cells that I need excluded. These cells all
begin
with the word "assist" so I tried the following function which isn't given
my
the expected results.

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

taking the small example below, I need it to calculate the answer 3 but
it's
calculating 4 (4 is answer of just the COUNTA portion so I don't think
it's
doing anything with my subtraction and COUNTIF portion)

MA-90
blank
MB-90
MA-90
blank
assist MB-90

This spreadsheet is a grid of sorts so I need the cells with assist to
stay
in this column; otherwise, I would separate the data and count again but
that
won't work in this case.

Hope this all make sense. Thanks for any assistance you can provide.
Marcia




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default CountIF or COUNTA for specific text

Good deal. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Office user" wrote in message
...
Viola! I found it. I went through each cell again and discovered one of
them had a space before my word "assist" so it threw off the COUNTIF.
Thanks
again for your help.
Marcia


"T. Valko" wrote:

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")


There's nothing wrong with your formula so if the result is incorrect you
may have unseen characters in those cells you think are blank. Are there
formulas in these cells that might return a formula blank ("") ? COUNTA
will
count formula blanks.

Try one of these and see what happens:

=COUNTIF(F7:F36," ")-COUNTIF(F7:F36,"assist*")

=SUMPRODUCT(--(LEN(TRIM(F7:F36))0))-COUNTIF(F7:F36,"assist*")


--
Biff
Microsoft Excel MVP


"Office user" wrote in message
...
I'm trying to count specific cells in my column of text. The CountA
would
work except there are some cells that I need excluded. These cells all
begin
with the word "assist" so I tried the following function which isn't
given
my
the expected results.

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

taking the small example below, I need it to calculate the answer 3 but
it's
calculating 4 (4 is answer of just the COUNTA portion so I don't think
it's
doing anything with my subtraction and COUNTIF portion)

MA-90
blank
MB-90
MA-90
blank
assist MB-90

This spreadsheet is a grid of sorts so I need the cells with assist to
stay
in this column; otherwise, I would separate the data and count again
but
that
won't work in this case.

Hope this all make sense. Thanks for any assistance you can provide.
Marcia








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default CountIF or COUNTA for specific text

Hi,

In 2007 you could use

=COUNTIFS(F7:F36,"<assist*",F7:F36,"<")

In 2003 you can use

=SUMPRODUCT(--(F7:F36<""))-COUNTIF(F7:F36,"assist*")

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Office user" wrote:

I'm trying to count specific cells in my column of text. The CountA would
work except there are some cells that I need excluded. These cells all begin
with the word "assist" so I tried the following function which isn't given my
the expected results.

=COUNTA(F7:F36)-COUNTIF(F7:F36,"assist*")

taking the small example below, I need it to calculate the answer 3 but it's
calculating 4 (4 is answer of just the COUNTA portion so I don't think it's
doing anything with my subtraction and COUNTIF portion)

MA-90
blank
MB-90
MA-90
blank
assist MB-90

This spreadsheet is a grid of sorts so I need the cells with assist to stay
in this column; otherwise, I would separate the data and count again but that
won't work in this case.

Hope this all make sense. Thanks for any assistance you can provide.
Marcia

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
If with countif or counta [email protected] Excel Worksheet Functions 3 September 28th 08 07:24 PM
Formula Help based around countif and counta Mark McDonough Excel Discussion (Misc queries) 2 June 6th 06 02:11 PM
countif counta with multiple lookup criteria JR573PUTT Excel Discussion (Misc queries) 1 February 15th 06 07:37 PM
CountIF, CountA,Which one? or neither? amy Excel Discussion (Misc queries) 2 July 20th 05 07:09 PM
COUNTA, COUNTIF? Newbie Excel Worksheet Functions 1 March 18th 05 11:33 AM


All times are GMT +1. The time now is 09:54 AM.

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"