VBA - add Excel formula that filters on bold

Rx_

Nothing In Moderation
Local time
Today, 06:32
Joined
Oct 22, 2009
Messages
2,803
How can the following Excel formula be modified to only count bold rows?
(see attachment)
Code:
=SUMPRODUCT(SUBTOTAL(3, OFFSET(C6:C6423, ROW(C6:C6423)-ROW(C6),0,1)),--(C6:C6423=A2))

My Access application dumps a recordset into Excel and customizes this formula to include the last row (i.e. 6423) based on the recordset count.

This formula works perfectlly but counts both bold and non bold.
The Excel worksheet also bolds the first record in a "name" column and then dims the duplicates in the same column.

The formula above counts all the record. The client wants to show the record, but only count the bold ones.
There is a way to filter the font on Excel user's interface, but the nonbold are hidden.
 

Attachments

  • Excel VBA count Bold.gif
    Excel VBA count Bold.gif
    14.9 KB · Views: 127

Users who are viewing this thread

Back
Top Bottom