+ Reply to Thread
Results 1 to 6 of 6

Compare 2 columns find missing data

Hybrid View

dalerdd Compare 2 columns find... 01-04-2013, 03:17 PM
dilipandey Re: Compare 2 columns find... 01-04-2013, 03:23 PM
dalerdd Re: Compare 2 columns find... 01-04-2013, 05:56 PM
AB33 Re: Compare 2 columns find... 01-04-2013, 06:43 PM
dilipandey Re: Compare 2 columns find... 01-05-2013, 05:00 AM
dalerdd Re: Compare 2 columns find... 01-05-2013, 10:49 AM
  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    35

    Compare 2 columns find missing data

    I want to compare two columns and paste the info from Column E that is missing from Column A into Column B.
    I tried VLookup but still new at functions, and scripts. Also not sure if it is better to use function or script?Attached is a file
    Thanks
    Dale
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Compare 2 columns find missing data

    Hi Dale,

    Use below formula:-

    Formula: copy to clipboard
    =IF(ISERROR(VLOOKUP($E1,$A:$A,1,0)),E1,"")


    see attached:-
    findMissing.xlsm

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Compare 2 columns find missing data

    Hi
    I do not think I have this working properly I am getting results that are the same on both columns.
    Attached is the excel
    Thanks
    Dale
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Compare 2 columns find missing data

    As an option
    Sub find_events()
    Dim c2 As Range, c As Range, LR As Long
    
        Application.ScreenUpdating = 0
        Application.EnableEvents = 0
    With Sheets("Sheet1")
        LR = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
        For Each c In .Range("E2:E" & LR)
            If Trim(c.Value) <> vbNullString Then
                Set c2 = Sheets("sheet1").Columns(1).Find(c.Value, , , 1)
                If c2 Is Nothing Then
                       Range(c.Address).Offset(, -3) = c.Offset(, 0)
                End If
            End If
        Next
    End With
        Application.ScreenUpdating = 1
        Application.EnableEvents = 1
    End Sub

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Compare 2 columns find missing data

    I do not think I have this working properly I am getting results that are the same on both columns.
    Issue is you have one extra space in your data.. check cell a1



    Regards,
    DILIPandey
    <click on below * if this helps>

  6. #6
    Registered User
    Join Date
    09-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Compare 2 columns find missing data

    That worked great! Thank You
    Dale

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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