Forum

VBA code to Recogni...
 
Notifications
Clear all

VBA code to Recognize Subtotal Grouping Range

2 Posts
2 Users
0 Reactions
103 Views
(@lt-cmdr-data)
Posts: 4
Active Member
Topic starter
 

I have some data on a worksheet with conditional formatting in two columns.  The formatting highlights a cell if it exceeds a certain number.  I then subtotal the rows (sum) based on quantities in those two columns.  The conditional formatting may highlight a quantity in the data row, the subtotal row, or both.  I have VBA code that does all this.  

What I need is code that will either identify the subtotal grouping that contains conditional formatting or does not contain conditional formatting.  Ultimately I want to keep the entire subtotal grouping associated with the conditional formatted cell (not just the row the conditional formatting is on) and discard the rest.  Does anyone know how to do this?  Thanks for any suggestions.

 
Posted : 11/06/2021 8:22 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Greg,

ActiveCell.DisplayFormat.Interior.Color will give you the formatting color. If this color matches the color you're looking for, you can do whatever you want with that cell.

 
Posted : 11/06/2021 11:36 pm
Share: