none
Cell color for duplicate values are not changing RRS feed

  • Question

  • Hi All,

    Please find the attached image.

    In row 74,75 and 76 cells color is not highlighting. Excel going to row 47,48 and 49 and highlighting the color as both have same values.

    In the below image when the loop reaches m value to 74 it automatically changing to 47 as it has the same value and highlighting the 47th row color. 

    Can anyone suggest me how can i highlight cell color even when i have duplicate values ?

    Below are the values are in row 47,48 and 49 and also repeating in 74,75 and 76.

    CH1-E013
    CH1-E012
    CH1-E011


    For Each c In Imp_Rawdata.Range("AB20:AB" & nrecords).SpecialCells(xlCellTypeVisible)
            
            With ThisWorkbook.Sheets(Exstng_Shts_Array(l))
                 For m = 20 To .Range("F" & Rows.Count).End(xlUp).Row
                    If Trim(Imp_Rawdata.Range("F" & c.Row)) = Trim(.Range("F" & m)) Then
                            Debug.Print Imp_Rawdata.Range("F" & c.Row) & "\" & .Range("F" & m)
                            .Range("F" & m & ":Z" & m).Interior.Color = 5296274
                            Ref_exists = True
                            Exit For
                    End If
                Next
            End With
        
      Next


    THanks in advance,

    Ramana

    Tuesday, January 29, 2013 8:34 AM

Answers