+ Reply to Thread
Results 1 to 5 of 5

Macro to match data from 2 columns

  1. #1
    Registered User
    Join Date
    08-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Macro to match data from 2 columns

    Hi all,
    I need some help getting this workbook to function as I want it.

    I need it to match data from columns A & B on Sheet 1 to columns D & E on Sheets 2,3, & 4 and return the serial numbers matching their locations to the correct columns on Sheet 1.

    I have done this manualy for sheet 2 to show what I mean.

    Thanks.

    Chris.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question [Sloved] Macro to match data from 2 columns

    Hi All,
    I have been working on this workbook for a while in my spare time and as its my first go at programming I have been learning a lot. I have to change jobs and I need to finish it in the next couple of weeks.

    I have a Macro to merge columns D & E on Sheets 2-4, and a formula to Index and Match this data on Sheet 1 in columns A & B.

    The problem is for each correct match only the first serial number is returned over and over again till the next match is made. What I need is to return each serial number just once and if there is no match return #N/A which I will delete with another Macro later.

    Any help will be greatly appreciated.

    Chris.
    Attached Files Attached Files
    Last edited by Chris herbert; 09-22-2009 at 10:43 PM. Reason: [Sloved]

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to match data from 2 columns

    Here is a formula based approach - from this you should be able to revisit your present VBA etc...

    In essence I did the following:

    1 - revised your key on Sheet2:4 such that each instance is unique

    2 - added a similar key to Sheet1 for purposes of Match

    3 - revised formulae to non-array INDEX/MATCH on Sheet1 and encased within LOOKUP to avoid need for double evaluation (to handle no match errors)
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-27-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Thumbs up [Sloved] Macro to match data from 2 columns

    Hi DonkeyOte.

    I never would have thought of coming at it from that way.

    Thanks for the help.

    Chris.
    Last edited by Chris herbert; 09-22-2009 at 10:44 PM. Reason: [Sloved]

  5. #5
    Registered User
    Join Date
    09-06-2013
    Location
    iran
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: [Sloved] Macro to match data from 2 columns

    I found it very late but any how.


    Thanks for the help.

    Mir

+ 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