• 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


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

Macro for Highlight cell with two condition


New Member
Hi All,

Hope you guys are doing great !

I want Column B to highlighted in RED, If Column B is "iPhone" and Column C is "Used". I am attaching the sample file.

Please give me coding for this.

Thank you so much in advance.


Marc L

Excel Ninja
according to your attachment a VBA beginner starter demonstration to paste to the Sheet1 worksheet module :​
Sub Demo1()
           Dim Rg As Range, R&
        Application.ScreenUpdating = False
    With Me.UsedRange.Columns(2)
           .Font.ColorIndex = xlAutomatic
           Set Rg = .Find("iPhone")
        If Not Rg Is Nothing Then
                   R = Rg.Row
                    If Rg(1, 2).Value2 = "Used" Then Rg.Font.Color = vbRed
                   Set Rg = .FindNext(Rg)
            Loop Until Rg.Row = R
                   Set Rg = Nothing
        End If
    End With
        Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom right Like !​

Marc L

Excel Ninja
As it rocks on my side, you just missed to well read my previous post, in particular the dark red direction !​
Tip for bad readers : replace Me keyword - a VBA help must see ! - with any other valid worksheet reference …​