Excel conditional formatting by color

%3CLINGO-SUB%20id%3D%22lingo-sub-3301168%22%20slang%3D%22en-US%22%3EExcel%20conditional%20formatting%20by%20color%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301168%22%20slang%3D%22en-US%22%3E%3CP%3Eif%20a%20cell%20in%20column%20B%20is%20green%20i%20need%20to%20change%20color%20of%20all%20duplicate%20values%20in%20that%20column%20to%20green.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Raminlol_0-1651567617856.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368781i81A3AFF36142FDE8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Raminlol_0-1651567617856.png%22%20alt%3D%22Raminlol_0-1651567617856.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3301168%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3301196%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20conditional%20formatting%20by%20color%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301196%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1379491%22%20target%3D%22_blank%22%3E%40Raminlol%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20use%20conditional%20formatting%2C%20you'd%20have%20to%20formulate%20a%20data-based%20rule%20to%20color%20cells%2C%20not%20a%20color-based%20rule.%3C%2FP%3E%0A%3CP%3EAn%20alternative%20would%20be%20a%20macro%20that%20loops%20through%20the%20cells%20in%20column%20B.%20If%20you%20encounter%20a%20green%20cell%2C%20loop%20through%20the%20cells%20below%20to%20color%20duplicates.%20That%20would%20be%20rather%20time-consuming%2C%20and%20you'd%20have%20to%20run%20the%20macro%20each%20time%20you%20manually%20color%20a%20cell%20green.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Visitor

if a cell in column B is green i need to change color of all duplicate values in that column to green.

Raminlol_0-1651567617856.png

 

1 Reply

@Raminlol 

If you want to use conditional formatting, you'd have to formulate a data-based rule to color cells, not a color-based rule.

An alternative would be a macro that loops through the cells in column B. If you encounter a green cell, loop through the cells below to color duplicates. That would be rather time-consuming, and you'd have to run the macro each time you manually color a cell green.