how to count only visible cells

Benjaminmin

Board Regular
Joined
Nov 20, 2009
Messages
116
Hi,

I have a spreadsheet with a lot of hidden rows in.

How can I do a count that only counts information in the visible cells?

Thank you very much in advance
Ben
 
Hi Benjamin

I do a lot of work that includes dupes...bane of my life!!

A simple formula as shown below, changed to your range will save you manually hiding duplicated rows!!

Excel Workbook
AB
1headerDupe Check
2Adefrtdupe
3Adefrtdupe
4Adefrtdupe
5Adefrtdupe
6Adefrtdupe
7Adefrtdupe
8Adefrtnotdupe
9Bdsaojddupe
10Bdsaojddupe
11Bdsaojddupe
12Bdsaojddupe
13Bdsaojddupe
14Bdsaojddupe
15Bdsaojddupe
16Bdsaojdnotdupe
17Cwsefqdupe
18Cwsefqdupe
19Cwsefqdupe
20Cwsefqdupe
21Cwsefqdupe
22Cwsefqnotdupe
23Dsernotdupe
24fsrtnotdupe
25ysrfqenotdupe
Sheet1



Filter on the added column for "Notdupe" and this will give you the total!!

HTH

Regards,
Ian
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
do u need a calc, or just a quick way to effect the count? You can do the latter by going to the top cell, then hit CTRL-SHIFT-<down arrow>, which will highlight all contiguous cells from the top and display the "count" in the lower right hand corner (excel 2007+)
 
Upvote 0
Yup, post #7 will work, just trying to save the OP having to manually hide 7K+ rows manually if he needs to repeat the task:eeek:
 
Upvote 0
To your solution, not a jot....my reference to 2003 was in response to netarc, we just cross posted:

do u need a calc, or just a quick way to effect the count? You can do the latter by going to the top cell, then hit CTRL-SHIFT-<DOWN arrow>, which will highlight all contiguous cells from the top and display the "count" in the lower right hand corner (excel 2007+)

Ian
 
Upvote 0
Ian's got the right idea, but not quite implimented correctly...

The option 9 in subtotal = SUM
so it was ADDING all the values, not COUNTING them..

If you want a count, it should be option 2

Also, it only ignores filtered rows, not rows hidden by hand...
Add 10 to the 2 (i.e. 102) to make it also ignore manually hidden rows..

Try
=SUBTOTAL(102,A1:A7751)

Also, 102 = count of NUMBERS
You may want 103 = count of ANY value, number OR text


Hope that helps.

Hi guys,

Sorry for being late in answering (different time zone).

Thank you very much for all your efforts in helping me with this.

The Subtotal(102) indeed did the trick perfectly for me, so thank you for that Jonmo.

Also big thanks to crook_101 for your many posts and patience! -And of course thanks to anyone else who posted.

This is the best forum ever!

Cheers
 
Upvote 0
Hmm that still returns 7610 (which is the number of cells that has content in them), so it doesnt ignore the hidden cells.

I think the solution is already mentioned... did you try this using 103



=SUBTOTAL(102,A1:A7751)

Also, 102 = count of NUMBERS
You may want 103 = count of ANY value, number OR text
 
Upvote 0

Forum statistics

Threads
1,224,620
Messages
6,179,927
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top