+ Reply to Thread
Results 1 to 5 of 5

Highlighting Duplicates across multiple worksheets

Hybrid View

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    Oxford, UK
    MS-Off Ver
    Mac Excel 2011
    Posts
    1

    Highlighting Duplicates across multiple worksheets

    Hi, my excel skills aren't all that great and i really need some help with this otherwise i think i may have to go through manually which could take hours!

    I have a database for a warehouse full of boxes, there are 12 sheets corresponding to different aisles in the warehouse, each with around 3000 box numbers in their specific locations.

    i also have 1 sheet which has a list of 2000 boxes i have to remove from the warehouse.

    is there a way (without moving everything to 1 page) that i can highlight all the duplicate numbers in their current sheets so it's easier to locate those boxes that need to be destroyed?

    Thanks, josh.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Highlighting Duplicates across multiple worksheets

    Hi washua

    will out the workbook something like
       Dim ws1 As Worksheet, ws2 As Worksheet
        Dim FoundOne As Range, LookInR As Range, LookForR As Range, c As Range
        Dim nr3    As Long, fAddress
        Application.ScreenUpdating = False
        Set ws1 = Sheets("Sheet7")
        Set ws2 = Sheets("Sheet8")
    
        Set LookInR = ws1.Range("A2:A10")
        Set LookForR = Range(ws2.Range("A2"), ws2.Range("A" & Rows.Count).End(xlUp))
    
        For Each c In LookForR
            With LookInR
                Set FoundOne = .Find(what:=c, LookAt:=xlPart)
             
                If Not FoundOne Is Nothing Then
                    fAddress = FoundOne.Address
                  
                    Do
                     
                    FoundOne.Interior.ColorIndex = 6
                          Set FoundOne = .FindNext(After:=FoundOne)
                    Loop While FoundOne.Address <> fAddress
                End If
            End With
        Next c
        Set ws1 = Nothing
        Set ws2 = Nothing
        Set LookInR = Nothing: Set LookForR = Nothing
        Application.ScreenUpdating = True
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Highlighting Duplicates across multiple worksheets

    arrr mac I not to sure if it will work

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Highlighting Duplicates across multiple worksheets

    Attach a sample workbook with dummy data and atleast 2 sheets.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Highlighting Duplicates across multiple worksheets

    If i understand correctly, a named range and some simple conditional formatting could be all that's needed, see attachment.
    Attached Files Attached Files

+ Reply to Thread

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