Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Counting Cells With Text

I would like to be able to count the number of cells within a range that
contain text, excluding those that are strictly numeric values. For example,
counting:
34
52
n/a
987
ooops
4
would return the result of 2.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Counting Cells With Text

DonArturo wrote:
I would like to be able to count the number of cells within a range that
contain text, excluding those that are strictly numeric values. For example,
counting:
34
52
n/a
987
ooops
4
would return the result of 2.


Array formula (commit with CTRL+SHIFT+ENTER):

=SUM(--ISTEXT(A1:A6))

Keep in mind that this will also count cells that look like numbers but are
actually entered as text. As an example, enter '52 instead of 52 in the data above.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting Cells With Text

Hi,

Try this

=COUNTA(A1:A6)-COUNT(A1:A6)

Mike

"DonArturo" wrote:

I would like to be able to count the number of cells within a range that
contain text, excluding those that are strictly numeric values. For example,
counting:
34
52
n/a
987
ooops
4
would return the result of 2.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Counting Cells With Text

Mike H wrote...
Try this

=COUNTA(A1:A6)-COUNT(A1:A6)

....

This counts all entries except numbers, which means it'd count boolean
and error values in addition to text.

Simplest way to count cells containing text is

=COUNTIF(range,"*")

which would include nonblank cells evaluating to "". To count only
text with one or more characters, use

=COUNTIF(range,"?*")
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Counting Cells With Text

Thanks guys. All three solutions worked as you said.
Harlan: Using =COUNTIF(range,"*") was especially helpful because it counted
both the text cells and the "" or null cells, which is what I needed. That
is, it counted them in the simple COUNTIF version. Using COUNTIFS, however,
produced a different result because I must put the equals inside the quotes.
Here is the actual formula:
=COUNTIFS($D$2:$D$1600,AE1,$K$2:$K$1600,"0",$N$2: $N$1600,"=*")
In this instance, it only counts the text cells and not the "" or null
cells. My workaround is to also use
=COUNTIFS($D$2:$D$1600,AE1,$K$2:$K$1600,"0",$N$2: $N$1600,"")
and add them together.
Unless you know a better way... :)
Thanks again.
Peace


_________________________________________
"Harlan Grove" wrote:

Mike H wrote...
Try this

=COUNTA(A1:A6)-COUNT(A1:A6)

....

This counts all entries except numbers, which means it'd count boolean
and error values in addition to text.

Simplest way to count cells containing text is

=COUNTIF(range,"*")

which would include nonblank cells evaluating to "". To count only
text with one or more characters, use

=COUNTIF(range,"?*")

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
Counting cells with text not listed. ladygr Excel Worksheet Functions 2 October 12th 07 09:38 PM
Counting cells that don't contain certain text JRD Excel Worksheet Functions 4 August 26th 06 11:39 PM
Counting cells with text Cissy Excel Worksheet Functions 1 July 11th 06 10:44 PM
Counting Occurrence of Text within Text in Cells in Range. Jeremy N. Excel Worksheet Functions 1 September 8th 05 05:16 AM
counting text cells Debbie Excel Worksheet Functions 4 February 8th 05 09:00 PM


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