• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run Macro Based Off Of Conditional Fill Color Or Font Color

I am using a formula for a filtered column.

=A2=A3


I am trying to execute a macro if any of the cells turn red (or whatever color).


This is a little more tricky for me than I initially thoguht...

What is the best way to do this?


A macro I've created searches for duplicates and removes them; however, I kinda need to see which ones they were before the macro deletes them.


How can I stop the macro and filter the duplicates to the top (or move the duplicates elsewhere) if any duplicates are found so I can get a chance to know what the duplicates were?


If no duplicates are found I would like my macro to keep going until finished as normal.
 
Never mind on this one.


I used a count if formula for before and after the duplicates were deleted, and then I subtracted those two values for a number.


Next, I used a macro to select those two cells and subtract them.


If 0, no duplicates were found, macro resumes tip top.


If greater than 0, there were duplicates deleted, and it stops my macro and does something else to let me know they were there.


The code I have is the most ugly and messy ever... because I don't know what I'm doing half the time... : )


But it works. If my code crosses the finish line I'm okay with that.
 
Back
Top