excel - Select all colored cells from conditional formatting -
i have range of cells (k6:m200) in sheet "summary" need use macro select cells colored based off conditional formatting. there following conditions:
- colored cells continuous k6 until whatever row not meet condition.
- not cells same color.
i'm new vba , macros i'm hoping can me figure out how this. i've tried few formulas , has not worked.
i'd suggest this:
sub selectcfcolours() dim cell range dim selrange range each cell in range("k6:m200") if cell.displayformat.interior.color <> cell.interior.color if selrange nothing set selrange = cell else set selrange = union(selrange, cell) end if end if next if not selrange nothing selrange.select end sub
Comments
Post a Comment