+ Reply to Thread
Results 1 to 4 of 4

finding different items and correct based on column

  1. #1
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    finding different items and correct based on column

    hi
    I have two sheets (complete,error)should match column B between two sheets based on column A if I find any error or missed items in column B into sheet2 then should correct based on sheet1 after match between columns B based on column A and show the error or missed items in column C as I put the expected result insheet correction .
    thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: finding different items and correct based on column

    sorry ! to correction the sheets (complete,missed )

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi, try this !


    According to your attachment a VBA demonstration for starters :

    PHP Code: 
    Sub Demo1()
        
    Dim VWXYR&, ZS
        With Sheets
    ("complete").UsedRange.Columns
            V 
    = .Item(1).Value2
            W 
    = .Item(2).Value2
        End With
        With Sheets
    ("missed").UsedRange.Columns("B:C")
           .
    Item(2).Rows("2:" & .Rows.Count).ClearContents
            X 
    = .Item(0).Value2
            Y 
    = .Value2
        
    For 2 To .Rows.Count
                         Z 
    Application.Match(X(R1), V0)
            If 
    IsNumeric(ZThen
                
    If W(Z1) <> Y(R1Then
                    Y
    (R2) = Split(W(Z1))
                For 
    Each S In Split(Y(R1))
                    
    Y(R1) = Application.Match(SY(R2), 0)
                    If 
    IsNumeric(Y(R1)) Then Y(R2)(Y(R1) - 1) = False
                Next
                    Y
    (R1) = W(Z1)
                    
    Y(R2) = Join(Filter(Y(R2), FalseFalse))
                
    End If
            
    End If
        
    Next
           
    .Value2 Y
        End With
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 01-20-2022 at 08:23 AM.

  4. #4
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: finding different items and correct based on column

    great! last thing and I'm really sorry add new requirement if you can do it I truly appreciate .
    I would add another column to show also the error when the run the macro
    you can see the data before and after .
    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)

Similar Threads

  1. [SOLVED] Filter Data Based on Unique Column Items and Save the Workbook with Filtered Items
    By IonutC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2019, 03:08 AM
  2. i need help finding the correct function for renaming a column...
    By anogai in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-10-2013, 08:35 PM
  3. [SOLVED] VBA copies rows based on specific items in a column but need to rename items created
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2013, 11:38 PM
  4. Finding sum of column items for 30 IDs out of say 100000 IDs
    By excelros in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2013, 09:53 PM
  5. [SOLVED] Finding Correct Row based on cell shading
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-08-2012, 09:26 PM
  6. Having problems with finding the correct excel formula for column
    By aussiemum32 in forum Excel - New Users/Basics
    Replies: 13
    Last Post: 07-01-2012, 10:02 PM
  7. Finding items in column which are NOT in a given list
    By schuc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-07-2007, 12:43 PM

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