PDA

View Full Version : [SOLVED:] Macro for Conditional Formatting



oam
02-13-2017, 06:35 PM
I need a macro that will add =Y6="Duplicate" as Conditional Formatting to every cell within range of A6:F145. Y6 to AD145 contains formulas used to locate duplicates within UPS tracking number scanned on the sheet and if there are duplicates among any columns, the cell in range Y6:AD145 will contain “Duplicate” and the corresponding cells in range A6:F145 will turn red.

The only reason I need a macro to add the Conditional Formatting is when the user scans the tracking number into the incorrect column they do not clear the cell or hit delete in the cell and reenter the tracking number; they cut and paste the tracking number into the correct column and as you know this messes up the conditional formatting in the pasted cell.

Any help on this matter would be greatly appreciated and I hope I have provided enough information to answer the question.

oam
02-13-2017, 08:41 PM
Sorry for the quick completion of this thread but I worked it out, all I had to do is add () around the Y6 like this =(Y6)="Duplicate" and it worked. Such a bone head!