I've created two buttons. One adds subtotals to a worksheet and conditionally formats the sheet to highlight any totals that don't add up to 100. The other removes the subtotals and resets the formatting to normal.
The reset option is working fine, but I can't get the function that formats the subtotaled data to work properly.
I'm confused on how to format a multi-row range of cells
based on the value in a cell at the beginning of each row.
The entire range of data is in a range named Sch_Data so I started witha
Range("Sch_Data").Select
The first cell of each line ends in the word Total.
So the formatting condition should be something like
AND(RIGHT($A5,5) ="Total",ActiveCell <>100)
But I don't think that ActiveCell is the right way to reference the cells to be formatted.
How should I be doing this?
Thanks in advance.
The reset option is working fine, but I can't get the function that formats the subtotaled data to work properly.
I'm confused on how to format a multi-row range of cells
based on the value in a cell at the beginning of each row.
The entire range of data is in a range named Sch_Data so I started witha
Range("Sch_Data").Select
The first cell of each line ends in the word Total.
So the formatting condition should be something like
AND(RIGHT($A5,5) ="Total",ActiveCell <>100)
But I don't think that ActiveCell is the right way to reference the cells to be formatted.
How should I be doing this?
Thanks in advance.