#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Countif(len(Range)4)

I am trying to find a simple way to Countif a range where the cell
contents can be either a 2,4 or 6 digit number, or a phone number
including dashes ("123-456-7890"). I want to count only the full 10
digit phone numbers.

Example:

22
32
4453
222333
123-456-7890
234-567-8901
23
4450
4449
222332


Result should be "2" as there are two full 10 digit phone numbers in
the sample.

It seems that something like =countif(len(a1:a10)6) would describe
what I want. Can anyone tell me if there is a way to use the Length
function in a countif is possible, and if so, how?

Any other ideas?

Thanks,
CortezTK

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Countif(len(Range)4)

Give this a try:

=SUMPRODUCT(--(LEN(A1:A10)6))

HTH,
Elkar


"Cortez" wrote:

I am trying to find a simple way to Countif a range where the cell
contents can be either a 2,4 or 6 digit number, or a phone number
including dashes ("123-456-7890"). I want to count only the full 10
digit phone numbers.

Example:

22
32
4453
222333
123-456-7890
234-567-8901
23
4450
4449
222332


Result should be "2" as there are two full 10 digit phone numbers in
the sample.

It seems that something like =countif(len(a1:a10)6) would describe
what I want. Can anyone tell me if there is a way to use the Length
function in a countif is possible, and if so, how?

Any other ideas?

Thanks,
CortezTK


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 430
Default Countif(len(Range)4)

=Count(Len(A1:A10,12)


"Cortez" wrote in message
oups.com...
I am trying to find a simple way to Countif a range where the cell
contents can be either a 2,4 or 6 digit number, or a phone number
including dashes ("123-456-7890"). I want to count only the full 10
digit phone numbers.

Example:

22
32
4453
222333
123-456-7890
234-567-8901
23
4450
4449
222332


Result should be "2" as there are two full 10 digit phone numbers in
the sample.

It seems that something like =countif(len(a1:a10)6) would describe
what I want. Can anyone tell me if there is a way to use the Length
function in a countif is possible, and if so, how?

Any other ideas?

Thanks,
CortezTK



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
Countif between a range? Keeprogoal Excel Worksheet Functions 1 June 21st 06 11:14 PM
Using countif with a name of a range webster Excel Worksheet Functions 3 June 14th 06 02:37 PM
countif using a range gerryR Excel Worksheet Functions 7 May 23rd 06 07:16 AM
Countif with range name gabch Excel Worksheet Functions 1 May 16th 06 12:21 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM


All times are GMT +1. The time now is 05:02 AM.

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"