Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, everyone!!
I have a worksheet that has data in column A and the other in column B. Now I want a VBA code that would higlight the data in column A if matches with that in Column B. The code should search the whole A column for a data in B1 then start for B2. I have a code mentioned below but it takes a long time but it works. Any can help me for a quick code process? Private Sub CommandButton1_Click() Dim I As Integer Worksheets("Sheet1").Activate For I = 6 To 877 For J = 6 To 877 If Cells(I, 2).Value = Cells(J, 22).Value Then Cells(I, 2).Interior.ColorIndex = 3 ElseIf Cells(I, 2).Value = "" Then Cells(I, 2).Interior.ColorIndex = 4 End If Next J Next I End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to highlight more related cells if cell highlight | Excel Discussion (Misc queries) | |||
Highlight if ... | Excel Worksheet Functions | |||
Highlight active cell and de-highlight previous cell | Excel Programming | |||
Highlight | Excel Discussion (Misc queries) | |||
Highlight cells with ctrl-click but only un-highlight one cell | Excel Discussion (Misc queries) |