Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default COUNTIF with non-continuous range

Can I use the COUNTIF function on an area that does not have a continuous
range?

Example:

=COUNTIF(AG4:AG25,AA4:AA26,U4:U26,B4:B26,H4:H26,N4 :N26,AZ4:AZ25,AT4:AT25,AN4:AN25,1)

Generates an error - too many arguments. I have also tried it with quotes:

=COUNTIF("AG4:AG25,AA4:AA26,U4:U26,B4:B26,H4:H26,N 4:N26,AZ4:AZ25,AT4:AT25,AN4:AN25",1)

But this, too, generates a general error.

Suggestions? I have a complex spreadsheet and I need to count values all
over it.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default COUNTIF with non-continuous range

As long as the criteria is *numeric* you can use a formula like this:

=INDEX(FREQUENCY((A3:A5,C3:E4,H6:H9),x),n)

x and n depend on what the range of values are. Are the numbers all
integers?

FREQUENCY performs a series of "COUNTIFs" based on x. x can be more than one
value. In your case you want to count 1s.

=INDEX(FREQUENCY((A3:A5,C3:E4,H6:H9),1),1)

However, this will count *all* numbers <=1. So, we need to know what the
range of numbers are then we can tweak x and n to get the correct result.

--
Biff
Microsoft Excel MVP


"Ken" wrote in message
...
Can I use the COUNTIF function on an area that does not have a continuous
range?

Example:

=COUNTIF(AG4:AG25,AA4:AA26,U4:U26,B4:B26,H4:H26,N4 :N26,AZ4:AZ25,AT4:AT25,AN4:AN25,1)

Generates an error - too many arguments. I have also tried it with
quotes:

=COUNTIF("AG4:AG25,AA4:AA26,U4:U26,B4:B26,H4:H26,N 4:N26,AZ4:AZ25,AT4:AT25,AN4:AN25",1)

But this, too, generates a general error.

Suggestions? I have a complex spreadsheet and I need to count values all
over it.



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
Named range not continuous. How to display values? Fries Excel Worksheet Functions 4 May 29th 08 11:41 AM
maximum over a non continuous range david Excel Worksheet Functions 6 October 2nd 07 04:14 PM
SUMIF Non-Continuous Range Kirk P. Excel Worksheet Functions 2 October 13th 06 09:46 PM
COUNTIF With Non-Continuous Cells MDW Excel Worksheet Functions 3 September 16th 05 04:44 PM
Sum function for non-continuous range Antje Excel Worksheet Functions 3 July 14th 05 01:13 PM


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