+ Reply to Thread
Results 1 to 6 of 6

Comparing Spreadsheets

Hybrid View

Nilla3321 Comparing Spreadsheets 06-16-2015, 11:12 AM
p24leclerc Re: Comparing Spreadsheets 06-16-2015, 11:59 AM
Nilla3321 Re: Comparing Spreadsheets 06-16-2015, 12:11 PM
p24leclerc Re: Comparing Spreadsheets 06-16-2015, 02:10 PM
Nilla3321 Re: Comparing Spreadsheets 06-16-2015, 02:19 PM
p24leclerc Re: Comparing Spreadsheets 06-16-2015, 02:08 PM
  1. #1
    Registered User
    Join Date
    06-16-2015
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    3

    Comparing Spreadsheets

    I'm using Excel 2003 and need to compare 2 worksheets to one another to find the errors in our system. I've uploaded a small version of this to dropbox.
    https://www.dropbox.com/s/l3q9px9gs81x37j/Test.xls?dl=0

    I actually need to do a few things to this sheet. Catalog is my master sheet, System is the one I need to find the errors in so...

    In System sheet
    Find Part #
    If Part # is located, check values in B-F to make sure they are the same - if not, highlight the offending cell.
    Then grab the price from column G and add it to column G in the Catalog sheet
    If Part # is not located - highlight part number

    Now I've tried some conditional formatting, I copied and pasted my list of part numbers into the same sheet and was able to accomplish the last portion of my goal (finding part #'s that are in the System but not the Catalog)
    =COUNTIF($A:$A, C1)

    However when I attempted to branch that out and find mismatching descriptions (B-F) my brain exploded and I can't even really tell what I'm trying to do...it did something, but this is why I'm pretty sure this might require actual code. For this one I also put all my data into 1 sheet - I don't know how to tell excel to reference a different worksheet.
    =ISERROR(MATCH($H12&I12&J12&K12&L12&M12, $A$2:$A$14&$B$2:$B$14&$C$2:$C$14&$D$2:$D$14&$E$2:$E$14&$F$2:$F$14,0))

    Hopefully I've explained this in a way that makes sense, it's so hard to get my brain to wrap around it so I figured it was worth a shot asking here! I also included a 3rd sheet in the dropbox file with a manual version of what I'm after. Thanks so much!

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Comparing Spreadsheets

    this formula in a conditional formatting works well but you have some data in your catalog that creates problems.
    =B2<>VLOOKUP($A2,Cat!$A:$G,COLUMN(B2),FALSE)
    Some numbers are entered as text and it creates issues with the conditional formatting.
    Can you have this changed?
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    06-16-2015
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Comparing Spreadsheets

    Hm, maybe that's why I'm having so much trouble with it. The fractions have been trouble from the get-go, sometimes they want to change to dates, sometimes they insist on being decimals. I keep trying to format the cells but it doesn't seem to take, or I'll click into the cell and then it decides to chose the random format it desires. I'm assuming the little green triangle in the corner means it's acting like a number?

    I did try to toss the VLOOKUP into the System sheet but it tells me "You may not use references to other worksheets or workbooks for conditional formatting criteria". Might have to tell the boss that this request is over my head XD

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Comparing Spreadsheets

    this small modification seems to do the trick:
    Public Sub Check_Cat()
    Dim WS_Cat As Worksheet, WS_SYS As Worksheet
    Dim C_ell As Range, F_ound As Range
    '
    Set WS_Cat = Sheets("Catalog")
    Set WS_SYS = Sheets("System")
    '
    WS_SYS.Select
    For Each C_ell In Range("A2", Cells(Rows.Count, 1).End(xlUp))
        Set F_ound = WS_Cat.Range("A:A").Find(C_ell, , , xlWhole)
        If Not F_ound Is Nothing Then
            'Cut Dia.
            If C_ell.Offset(0, 1).Text <> F_ound.Offset(0, 1).Text Then
                C_ell.Offset(0, 1).Interior.ColorIndex = 3
            End If
            'Shank Dia.
            If C_ell.Offset(0, 2).Text <> F_ound.Offset(0, 2).Text Then
                C_ell.Offset(0, 2).Interior.ColorIndex = 3
            End If
            'Loc.
            If C_ell.Offset(0, 3).Text <> F_ound.Offset(0, 3).Text Then
                C_ell.Offset(0, 3).Interior.ColorIndex = 3
            End If
            'OAL
            If C_ell.Offset(0, 4).Text <> F_ound.Offset(0, 4).Text Then
                C_ell.Offset(0, 4).Interior.ColorIndex = 3
            End If
            'Reach
            If C_ell.Offset(0, 5).Text <> F_ound.Offset(0, 5).Text Then
                C_ell.Offset(0, 5).Interior.ColorIndex = 3
            End If
            'Price is transfered to Catalog sheet
            F_ound.Offset(0, 6) = C_ell.Offset(0, 6)
        Else
            C_ell.Interior.ColorIndex = 6
        End If
    Next
    End Sub

  5. #5
    Registered User
    Join Date
    06-16-2015
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Comparing Spreadsheets

    ! That sure does seem to do the trick, thank you thank you! I'll have to study that code so I can try to modify it next time I'm asked for something like this. Going to give it a shot on 200 or so part #'s and then see what happens when I plug it into the 14k list, lol.

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Comparing Spreadsheets

    you can try this macro but the same problem exist with some of your data:
    Public Sub Check_Cat()
    Dim WS_Cat As Worksheet, WS_SYS As Worksheet
    Dim C_ell As Range, F_ound As Range
    '
    Set WS_Cat = Sheets("Catalog")
    Set WS_SYS = Sheets("System")
    '
    WS_SYS.Select
    For Each C_ell In Range("A2", Cells(Rows.Count, 1).End(xlUp))
        Set F_ound = WS_Cat.Range("A:A").Find(C_ell, , , xlWhole)
        If Not F_ound Is Nothing Then
            'Cut Dia.
            If C_ell.Offset(0, 1) <> F_ound.Offset(0, 1) Then
                C_ell.Offset(0, 1).Interior.ColorIndex = 3
            End If
            'Shank Dia.
            If C_ell.Offset(0, 2) <> F_ound.Offset(0, 2) Then
                C_ell.Offset(0, 2).Interior.ColorIndex = 3
            End If
            'Loc.
            If C_ell.Offset(0, 3) <> F_ound.Offset(0, 3) Then
                C_ell.Offset(0, 3).Interior.ColorIndex = 3
            End If
            'OAL
            If C_ell.Offset(0, 4) <> F_ound.Offset(0, 4) Then
                C_ell.Offset(0, 4).Interior.ColorIndex = 3
            End If
            'Reach
            If C_ell.Offset(0, 5) <> F_ound.Offset(0, 5) Then
                C_ell.Offset(0, 5).Interior.ColorIndex = 3
            End If
            'Price is transfered to Catalog sheet
            F_ound.Offset(0, 6) = C_ell.Offset(0, 6)
        Else
            C_ell.Interior.ColorIndex = 6
        End If
    Next
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Comparing two spreadsheets
    By brianfitz in forum Excel General
    Replies: 3
    Last Post: 05-16-2011, 06:14 AM
  2. Comparing Spreadsheets
    By TJD12485 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2007, 05:58 PM
  3. Comparing 2 Spreadsheets
    By mizzrizz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2006, 01:32 PM
  4. [SOLVED] Comparing two spreadsheets
    By Freddo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2006, 06:45 AM
  5. Comparing two spreadsheets
    By Morten in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-21-2005, 09:30 AM

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