Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Match Values and Highlite row
Hi all, I have list of 6 digit numbers in Column A of Sheet2 like see
below A …….col 665544 564788 658977 457896 335566 789456 etc…….. I want macro which should match Sheet1 Range("B2:B100") values in Sheet2 Column A values (as shown above) and if value match then do nothing but the value which don’t match then macro should higlight that value cell row in Sheet1 from row B to F. Please can any friend can help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Match Values and Highlite row
Public Sub Hilite()
Dim LastRow As Long Dim i As Long With Worksheets("Sheet1") LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row For i = 1 To LastRow If IsError(Application.Match(.Cells(i, "B").Value, Worksheets("Sheet2").Columns(1),0) Then .Cells(i, "B").Resize(,5).Interior.Colorindex = 38 End If Next i End Sub -- __________________________________ HTH Bob "K" wrote in message ... Hi all, I have list of 6 digit numbers in Column A of Sheet2 like see below A …….col 665544 564788 658977 457896 335566 789456 etc…….. I want macro which should match Sheet1 Range("B2:B100") values in Sheet2 Column A values (as shown above) and if value match then do nothing but the value which don’t match then macro should higlight that value cell row in Sheet1 from row B to F. Please can any friend can help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Match Values and Highlite row
On May 13, 12:59*pm, "Bob Phillips" wrote:
Public Sub Hilite() Dim LastRow As Long Dim i As Long * * With Worksheets("Sheet1") * * * * LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row * * * * For i = 1 To LastRow * * * * * * If IsError(Application.Match(.Cells(i, "B").Value, Worksheets("Sheet2").Columns(1),0) Then * * * * * * * * .Cells(i, "B").Resize(,5).Interior.Colorindex = 38 * * * * * * End If * * * * Next i End Sub -- __________________________________ HTH Bob "K" wrote in message ... Hi all, I have list of 6 digit numbers in Column A of Sheet2 like see below *A …….col 665544 564788 658977 457896 335566 789456 etc…….. I want macro which should match Sheet1 Range("B2:B100") values in Sheet2 Column A values (as shown above) and if value match then do nothing but the value which don’t match then macro should higlight that value cell row in Sheet1 from row B to F. Please can any friend can help Thanks Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Match formula to match values in multiple columns | Excel Discussion (Misc queries) | |||
Match several values in €˜Summary Sheet to several values in €˜Mast | Excel Programming | |||
how can we get unique values in match function for same match key. | Excel Worksheet Functions | |||
Match Values in Rows with Partial Values in Columns | Excel Worksheet Functions | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming |