+ Reply to Thread
Results 1 to 2 of 2

Sumproduct subtotal filter count only bold cells

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Vail, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    83

    Post Sumproduct subtotal filter count only bold cells

    Need custom Formula to count only bold cells in a filtered column - using a sumproduct with subtotal

    My report uses TSQL to bring data from a database and then uses VBA to create a Excel report. The report has an auto filter across the columns.
    The records returned are bolded for the first instance of a name, and the second instance is a light gray.
    The Excel cell B4 has a formula that counts the visible rows for the text matching in A4.

    Now, I need to only count the bold cells.
    Shown is the working formula in the Cell. The working code that puts the formula in the cell, and a small screen shot.

    My guess is that some kind of conditional format need to be embedded in the subtotal section. Any suggestions would be appreciated.

    Excel cell B4 contains
    Please Login or Register  to view this content.

    VBA code counts recordset (intMaxRecordCount) and generates dynamic formula
    Please Login or Register  to view this content.
    Last edited by RxMiller; 07-20-2011 at 01:30 PM. Reason: gif did not load

  2. #2
    Registered User
    Join Date
    03-05-2009
    Location
    Vail, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    83

    Post Re: Sumproduct subtotal filter count only bold cells

    The Gif mentioned above is here

    Got the solution. Will modify my OBXL string and add two more line of code before it.
    It won't require a UDF (user defined function) with all the macro workbook mess.

    Was watching the series Starhunter 2300 "Just Politics" last night on NetFlicks for the first time (catching up with series I completely missed).
    The Wave Overlay programming concept used as the centerpeice of the episode gave me the idea for the solution.
    Can use the formula posted above with some very slight modifications.

    Couldn't find any solutions other than a UDF anywhere. And, UDF won't necessarly update in a dynamic way.
    This solution will be dynamic, and only count the bold rows that are visible, and won't show an error if zero rows.
    Attached Images Attached Images
    Last edited by RxMiller; 07-20-2011 at 01:35 PM. Reason: created solution

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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