Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Count Filtered Visible Items that Match Numeric Criteria between two ranges

Hi All,

I'm using the Formula below to give me a static count of numeric values that
fall within a specified range; say 50-75 inclusive. These ranges are housed
in cell X$1. The Named Range "Data" is a dynamic 9 column range spanning many
rows. Named Range "Data" is defined as
=OFFSET(Sheet1!$H$15,0,0,COUNT(Sheet1!$H:$H),9)

Static Count:
=COUNTIF(Data,"="&LEFT(X$1,2))-COUNTIF(Data,""&RIGHT(X$1,2))

Based on the above can anyone provide a Formula that provides a Dynamic Count
when "Data" is filtered.

Thanks
Sam

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200609/1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Count Filtered Visible Items that Match Numeric Criteria between two ranges

Try...

=SUM(IF(SUBTOTAL(3,OFFSET(Data,ROW(Data)-MIN(ROW(Data)),0,1)),IF(Data=LE
FT(X$1,2),IF(Data<=RIGHT(X$1,2),1))))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article <66940ec24c9a0@uwe, "Sam via OfficeKB.com" <u4102@uwe
wrote:

Hi All,

I'm using the Formula below to give me a static count of numeric values that
fall within a specified range; say 50-75 inclusive. These ranges are housed
in cell X$1. The Named Range "Data" is a dynamic 9 column range spanning many
rows. Named Range "Data" is defined as
=OFFSET(Sheet1!$H$15,0,0,COUNT(Sheet1!$H:$H),9)

Static Count:
=COUNTIF(Data,"="&LEFT(X$1,2))-COUNTIF(Data,""&RIGHT(X$1,2))

Based on the above can anyone provide a Formula that provides a Dynamic Count
when "Data" is filtered.

Thanks
Sam

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Count Filtered Visible Items that Match Numeric Criteria between two ranges

Actually, since Data contains numeric values, the values returned by
both the LEFT and RIGHT functions need to be coerced into numerical
values. Therefore...

LEFT(X$1,2)

should be

LEFT(X$1,2)+0

and

RIGHT(X$1,2)

should be

RIGHT(X$1,2)+0

Hope this helps!

In article ,
Domenic wrote:

Try...

=SUM(IF(SUBTOTAL(3,OFFSET(Data,ROW(Data)-MIN(ROW(Data)),0,1)),IF(Data=LE
FT(X$1,2),IF(Data<=RIGHT(X$1,2),1))))

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article <66940ec24c9a0@uwe, "Sam via OfficeKB.com" <u4102@uwe
wrote:

Hi All,

I'm using the Formula below to give me a static count of numeric values
that
fall within a specified range; say 50-75 inclusive. These ranges are housed
in cell X$1. The Named Range "Data" is a dynamic 9 column range spanning
many
rows. Named Range "Data" is defined as
=OFFSET(Sheet1!$H$15,0,0,COUNT(Sheet1!$H:$H),9)

Static Count:
=COUNTIF(Data,"="&LEFT(X$1,2))-COUNTIF(Data,""&RIGHT(X$1,2))

Based on the above can anyone provide a Formula that provides a Dynamic
Count
when "Data" is filtered.

Thanks
Sam

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Count Filtered Visible Items that Match Numeric Criteria between two ranges

Hi Domenic,

Sorry, didn't see your amendment before I posted. The Formula works fine with
this amendment.

Thanks again for your assistance.

Cheers,
Sam

Domenic wrote:
Actually, since Data contains numeric values, the values returned by
both the LEFT and RIGHT functions need to be coerced into numerical
values. Therefore...


LEFT(X$1,2)


should be


LEFT(X$1,2)+0


and


RIGHT(X$1,2)

should be


RIGHT(X$1,2)+0

Hope this helps!


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200609/1

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Count Filtered Visible Items that Match Numeric Criteria between two ranges

Hi Domenic,

Thanks for reply. The Formula is not returning the desired result. It
returns zero.

Further help appreciated.

Cheers,
Sam



Domenic wrote:
Try...


=SUM(IF(SUBTOTAL(3,OFFSET(Data,ROW(Data)-MIN(ROW(Data)),0,1)),IF(Data=LE
FT(X$1,2),IF(Data<=RIGHT(X$1,2),1))))


...confirmed with CONTROL+SHIFT+ENTER.


Hope this helps!


--
Message posted via http://www.officekb.com



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
Count if two columns match different criteria Curt D. Excel Worksheet Functions 5 May 14th 23 07:44 PM
How can I count items in a filtered list? Counting filtered data. Excel Worksheet Functions 44 April 4th 23 10:22 AM
Find and Count Frequency of Numeric Value in Non-Contiguous Rows Sam via OfficeKB.com Excel Worksheet Functions 2 September 17th 06 09:17 PM
Count of items using multiple criteria mbparks Excel Worksheet Functions 7 January 2nd 05 09:57 PM
Find Count of Items with certain criteria Tucson Guy Excel Discussion (Misc queries) 3 January 1st 05 02:11 PM


All times are GMT +1. The time now is 03:05 PM.

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"