Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Is it possible to ONLY count values that appear within UNHIDDEN ce

I have several rows of data that are HIDDEN and I don't want to count the
data within them. When I use COUNTIF, it counts the values even in the
hidden rows. Is it possible to restrict the COUNTIF function only to
UNHIDDEN cells?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Is it possible to ONLY count values that appear within UNHIDDEN ce

depending on your Excel version, the Subtotal function has arguments that
allow you to SUM/COUNT/AVERAGE, etc on only displayed rows

So

=subtotal(9,a1:a100) will SUM the entire range

=subtotal(109,a1:a100) will SUM only displayed cells in the range



"RABrown" wrote:

I have several rows of data that are HIDDEN and I don't want to count the
data within them. When I use COUNTIF, it counts the values even in the
hidden rows. Is it possible to restrict the COUNTIF function only to
UNHIDDEN cells?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Is it possible to ONLY count values that appear within UNHIDDE

Thank you for your help, Duke ....but I need a little more. I want to count
the number of UNHIDDEN cells with a given TEXT value. As I understand the
"Subtotal" function, I may be able to use the Subtotal function #103 (COUNTA)
to do this, but I don't know how to include within the Subtotal function the
exact text which I'm looking for. Can you help?

"Duke Carey" wrote:

depending on your Excel version, the Subtotal function has arguments that
allow you to SUM/COUNT/AVERAGE, etc on only displayed rows

So

=subtotal(9,a1:a100) will SUM the entire range

=subtotal(109,a1:a100) will SUM only displayed cells in the range



"RABrown" wrote:

I have several rows of data that are HIDDEN and I don't want to count the
data within them. When I use COUNTIF, it counts the values even in the
hidden rows. Is it possible to restrict the COUNTIF function only to
UNHIDDEN cells?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Is it possible to ONLY count values that appear within UNHIDDE

Not good from a design point of view though


=SUMPRODUCT(--($A$2:$A$500="text"),(SUBTOTAL(103,OFFSET($A$2,ROW ($A$2:$A$500)-MIN(ROW($A$2:$A$500)),,))))


adapt it to fit your own requirements, if basically works as if you could
use


=COUNTIF($A$2:$A$500,"text")


except that it only counts visible cells

also note that it won't work in version
earlier than 2003, if you have that you would need
VBA to create a UDF

--


Regards,


Peo Sjoblom

"RABrown" wrote in message
...
Thank you for your help, Duke ....but I need a little more. I want to
count
the number of UNHIDDEN cells with a given TEXT value. As I understand the
"Subtotal" function, I may be able to use the Subtotal function #103
(COUNTA)
to do this, but I don't know how to include within the Subtotal function
the
exact text which I'm looking for. Can you help?

"Duke Carey" wrote:

depending on your Excel version, the Subtotal function has arguments that
allow you to SUM/COUNT/AVERAGE, etc on only displayed rows

So

=subtotal(9,a1:a100) will SUM the entire range

=subtotal(109,a1:a100) will SUM only displayed cells in the
range



"RABrown" wrote:

I have several rows of data that are HIDDEN and I don't want to count
the
data within them. When I use COUNTIF, it counts the values even in
the
hidden rows. Is it possible to restrict the COUNTIF function only to
UNHIDDEN cells?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Is it possible to ONLY count values that appear within UNHIDDENce

As Duke mentioned, SUBTOTAL is great. It works with either filtered or
hidden data.

Excel Help is recommended on this one because it does get complicated:
1 is average, 2 is count, 3 is counta, etc. I use this any time I have
an autofilter on a sheet.

On Nov 3, 4:20*pm, RABrown wrote:
I have several rows of data that are HIDDEN and I don't want to count the
data within them. * When I use COUNTIF, it counts the values even in the
hidden rows. * Is it possible to restrict the COUNTIF function only to
UNHIDDEN cells?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Is it possible to ONLY count values that appear within UNHIDDEN ce


SUBTOTAL does not include COUNTIF, as you've found.

If you can use AutoFilter to exclude the rows that do not contain the
particular text value in the column of interest, you can use SUBTOTAL(3,
...) or SUBTOTAL(103, ...) (COUNTA).

However, that will unhide any rows that you have manually hidden that
contain the text value.


--
shg
------------------------------------------------------------------------
shg's Profile: http://www.thecodecage.com/forumz/member.php?userid=13
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24671

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Is it possible to ONLY count values that appear within UNHIDDE

Thank you so much, Peo. I don't understand WHY or HOW your formula
suggestion works, but it DOES. THANKS!

"Peo Sjoblom" wrote:

Not good from a design point of view though


=SUMPRODUCT(--($A$2:$A$500="text"),(SUBTOTAL(103,OFFSET($A$2,ROW ($A$2:$A$500)-MIN(ROW($A$2:$A$500)),,))))


adapt it to fit your own requirements, if basically works as if you could
use


=COUNTIF($A$2:$A$500,"text")


except that it only counts visible cells

also note that it won't work in version
earlier than 2003, if you have that you would need
VBA to create a UDF

--


Regards,


Peo Sjoblom

"RABrown" wrote in message
...
Thank you for your help, Duke ....but I need a little more. I want to
count
the number of UNHIDDEN cells with a given TEXT value. As I understand the
"Subtotal" function, I may be able to use the Subtotal function #103
(COUNTA)
to do this, but I don't know how to include within the Subtotal function
the
exact text which I'm looking for. Can you help?

"Duke Carey" wrote:

depending on your Excel version, the Subtotal function has arguments that
allow you to SUM/COUNT/AVERAGE, etc on only displayed rows

So

=subtotal(9,a1:a100) will SUM the entire range

=subtotal(109,a1:a100) will SUM only displayed cells in the
range



"RABrown" wrote:

I have several rows of data that are HIDDEN and I don't want to count
the
data within them. When I use COUNTIF, it counts the values even in
the
hidden rows. Is it possible to restrict the COUNTIF function only to
UNHIDDEN cells?




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Is it possible to ONLY count values that appear within UNHIDDE

Thanks for the feedback

--


Regards,


Peo Sjoblom

"RABrown" wrote in message
...
Thank you so much, Peo. I don't understand WHY or HOW your formula
suggestion works, but it DOES. THANKS!

"Peo Sjoblom" wrote:

Not good from a design point of view though


=SUMPRODUCT(--($A$2:$A$500="text"),(SUBTOTAL(103,OFFSET($A$2,ROW ($A$2:$A$500)-MIN(ROW($A$2:$A$500)),,))))


adapt it to fit your own requirements, if basically works as if you could
use


=COUNTIF($A$2:$A$500,"text")


except that it only counts visible cells

also note that it won't work in version
earlier than 2003, if you have that you would need
VBA to create a UDF

--


Regards,


Peo Sjoblom

"RABrown" wrote in message
...
Thank you for your help, Duke ....but I need a little more. I want to
count
the number of UNHIDDEN cells with a given TEXT value. As I understand
the
"Subtotal" function, I may be able to use the Subtotal function #103
(COUNTA)
to do this, but I don't know how to include within the Subtotal
function
the
exact text which I'm looking for. Can you help?

"Duke Carey" wrote:

depending on your Excel version, the Subtotal function has arguments
that
allow you to SUM/COUNT/AVERAGE, etc on only displayed rows

So

=subtotal(9,a1:a100) will SUM the entire range

=subtotal(109,a1:a100) will SUM only displayed cells in
the
range



"RABrown" wrote:

I have several rows of data that are HIDDEN and I don't want to
count
the
data within them. When I use COUNTIF, it counts the values even in
the
hidden rows. Is it possible to restrict the COUNTIF function only
to
UNHIDDEN cells?






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 Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM
Count Intervals of 2 Numeric values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 12 September 24th 05 10:58 PM
... Count, <<< Positive Values minus Negative Values >>> ... Dr. Darrell Excel Worksheet Functions 4 September 8th 05 01:36 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM


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