+ Reply to Thread
Results 1 to 4 of 4

Excel Row Counting

Hybrid View

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    Iran
    MS-Off Ver
    2013
    Posts
    3

    Excel Row Counting

    Hello friends
    I want to count the rows of my filtered table. can I do it using functions and formulas or I have to code VB using marcos ?

    Let's say we have a table like below
    1.png

    I want to filter the table through column "name" by elements 'a' and 'b'. the result is like this
    2.png

    But I want the "row count" to start from 1 and end up to 3. ie.
    3.png
    please let me know what the solution will be like.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Excel Row Counting

    The SUBTOTAL function calculates on visible cells.

    =SUBTOTAL(FuncNum,Range)
    Func Num__Function
    1_________AVERAGE
    2_________COUNT
    3_________COUNTA
    4_________MAX
    5_________MIN
    6_________PRODUCT
    7_________STDEV
    8_________STDEVP
    9_________SUM
    10________VAR
    11________VARP
    Note: Adding 100 to any of those FuncNums causes the SUBTOTAL function to ignore HIDDEN rows, not just hidden FILTERED rows.

    Example: =SUBTOTAL(103,A1:A20) counts non-blank, non-hidden cells.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Excel Row Counting

    Make D2:

    =SUBTOTAL(103,$b$2:B2)
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    06-03-2015
    Location
    Iran
    MS-Off Ver
    2013
    Posts
    3

    Re: Excel Row Counting

    Ron Coderre and daffodil11:
    You guys helped me a lot
    It worked !
    thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Counting Help
    By insomniacomi in forum Excel General
    Replies: 1
    Last Post: 03-06-2014, 03:43 PM
  2. [SOLVED] Counting Matching values in two separate ranges without counting duplicates
    By Rhall6310 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-01-2014, 03:35 PM
  3. Replies: 3
    Last Post: 03-01-2012, 06:17 AM
  4. Replies: 6
    Last Post: 02-04-2012, 06:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1