+ Reply to Thread
Results 1 to 4 of 4

Subtotal Function

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    37

    Subtotal Function

    Hi, I am still really new to this macro stuff and am trying to apply the subtotal function to give me a value in a cell. I have a filtered range in a different workbook, I need to count the number of cells visible that include data. It is my understanding that this is what the subtotal function is for. Unfortunately I can't figure out the syntax or the code. This is how it looks right now and I keep getting a "type mismatch" error. Please help, thanks so much!

    ActiveCell.Value = Application.WorksheetFunction.Subtotal(xlCount, Workbooks("Workbook2.xls"), Worksheets("Sheet2").Range("A:A"))

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Subtotal Function

    Hi AngelFish13,

    Try below one:-

    Please Login or Register  to view this content.
    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    06-17-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Subtotal Function

    It worked! I knew it was some kind of syntax error. Thank you so much!!!

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Subtotal Function

    you are welcome ....

    cheers



    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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