Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I hate to encourage you, because <strong>you did not follow the site rules that say to research and attempt a solution before asking a quesiton, and share what you have already tried</strong>. That is probably why others have given your question a negative rating.</p> <p>However, you did enough thinking about the parameters of your problem, that I suspect you may have tried something before composing this question, and I'm granting you the benefit of the doubt. Here is a possible solution, if by "pre colour coded data" you mean the interior of the cell. </p> <p>Change the Constants at the top to match the column and header row of your data.</p> <p>If the pre colour coding of your data is something other than the interior settings I've used, you can take Marty McVry's advice of using the macro recorder to determine which settings you are changing and incorporate them in this code (where the <code>With rCell.Interior</code> code is).</p> <pre><code>Sub MatchColor() Const sColumnID As String = "A" Const iHeaderID As Integer = 1 Dim rCell As Range Dim rColumn As Range Set rColumn = Range(sColumnID &amp; iHeaderID, Range(sColumnID &amp; iHeaderID).End(xlDown)) For Each rCell In rColumn If rCell.Value = rCell.Offset(0, 1).Value Then With rCell.Interior .Pattern = rCell.Offset(0, 1).Interior.Pattern .PatternColorIndex = rCell.Offset(0, 1).Interior.PatternColorIndex .ThemeColor = rCell.Offset(0, 1).Interior.ThemeColor .TintAndShade = rCell.Offset(0, 1).Interior.TintAndShade .PatternTintAndShade = rCell.Offset(0, 1).Interior.PatternTintAndShade End With End If Next rCell End Sub </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload