Results 1 to 2 of 2

search cell values based on list of values in other sheet and add color to row

Threaded View

darkbraids search cell values based on... 07-09-2012, 09:12 AM
darkbraids Re: search cell values based... 07-10-2012, 08:35 AM
  1. #1
    Registered User
    Join Date
    06-24-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    5

    search cell values based on list of values in other sheet and add color to row

    
    Sub Reformat()
         
        Dim SrchRng3 As Range
        Dim c3 As Range, f As String
        Dim allpart As Range
       
        'partnumber to search is based on value of A1 in Sheet2
        Set allpart = Sheet2.Range("A1")'-------------------------help me on this only one cell value can be search,dont know how to add A2 A3 and so on...
        'search partnumber from A1 to A65536 in sheet1
        Set SrchRng3 = Sheet1.Range("A1", Sheet1.Range("A65536").End(xlUp))
        Set c3 = SrchRng3.Find(allpart, LookIn:=xlValues)
        
        If Not c3 Is Nothing Then
            f = c3.Address
            Do
                With Sheet1.Range("A" & c3.Row & ":IV" & c3.Row)
                'set color and font color if part number is searched
                    .Font.ColorIndex = 0
                    .Interior.ColorIndex = 37
                End With
                Set c3 = SrchRng3.FindNext(c3)
            Loop While c3.Address <> f
        End If
         
    End Sub
    can you help me add array or some code to search all value in sheet1 based on values in sheet2.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1