+ Reply to Thread
Results 1 to 3 of 3

matching column with original one

  1. #1
    Registered User
    Join Date
    04-20-2010
    Location
    riyadh, saudi arabia
    MS-Off Ver
    Excel 2007
    Posts
    7

    matching column with original one

    dear friends,

    problem is: i have a big list of names is sheet2 and i have some final list in sheet 3.
    i want to write a macro, which , when i click that it first look the final list, then come to sheet2 and keep the name which are exist in final list only rest all need to delete.

    i am using vlookup function but facing problem in it.

    some one give me idea on how to ??????

    my code goes like this....

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2407 Win 11 Home 64 Bit
    Posts
    24,050

    Re: matching column with original one

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,697

    Re: matching column with original one

    You may try the following code (not tested as sample file not provided):
    Please Login or Register  to view this content.
    the approach is bottom-up, with every sheet2 element tested if it is within the list on sheet3.
    if not - it is deleted.
    Last edited by Kaper; 03-09-2015 at 12:00 PM.
    Best Regards,

    Kaper

+ 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. Finding Matching Data in one Column/Adding corresponding matching string value.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2013, 07:23 PM
  2. Replies: 3
    Last Post: 08-02-2013, 02:16 PM
  3. New to VBA - Macro to leave original column untouched while altering 2nd column. Help
    By TrueStory in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2012, 05:12 AM
  4. Replies: 1
    Last Post: 07-25-2011, 01:07 PM
  5. Search to find matching cells and copy/transpose adjacent data to original sheet?
    By thump4r in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2009, 09:20 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