The following returns all the ranges that have conditional formatting set up. It puts a border around each contiguous section it finds:

Set rngCond = ActiveSheet.Cells.SpecialCells(xlCellTypeAllFormatConditions) If Not rngCond Is Nothing Then rngCond.BorderAround xlContinuous End If

Have you ever had someone send you a worksheet without all the labels filled in? Some people consider the data shown in Figure 3.10 to look neat.They enter the Region field only once for each region.This may look aesthetically pleasing, but it is impossible to sort. Even Excel's pivot table routinely returns data in this annoying format.

Figure 3.10

The blank cells in the region column make data tables such as this very difficult to sort.

0 0

Post a comment