excel - Find cell with conditional formatting -


i have conditionally formatted worksheet change color of cells if values in error. data validation user may cut , paste large amounts of data worksheet @ once.

i want write macro (which link button) find , go first cell conditional formatting, next, etc. far, no luck. if not possible, may remove conditional formatting , have macro change cell color can more detected vba.

i can detect if there conditional formatting with

if activecell.displayformat.interior.color <> 16777215

but having trouble putting find sub.

to more specific, columns - af have values , formatted red if not meet conditions. i'd duplicate of find button conditional formatting. have suggestions. i've seen similar questions seem asking counts or totals , that's not need. in advance.

here function returns array of cell address have been conditionally formatted light red background. edit suit purpose.

public function findconditionals() variant     dim ws worksheet, ccell range, cntr integer     dim formattedcells(100) variant ' used number of cells in used range here     set ws = activesheet     cntr = 1      each ccell in ws.usedrange         if ccell.displayformat.interior.color = 13551615  ' put own color in             formattedcells(cntr) = ccell.address             cntr = cntr + 1         end if     next ccell     findconditionals = formattedcells end function 

Comments