Results 1 to 2 of 2

Macro to loop through one column and find a match from other column, then copy data

Threaded View

sepi Macro to loop through one... 05-05-2011, 04:48 PM
sepi Re: Macro to loop through one... 05-06-2011, 03:08 AM
  1. #1
    Registered User
    Join Date
    04-02-2011
    Location
    Espoo
    MS-Off Ver
    Excel 2007
    Posts
    16

    Macro to loop through one column and find a match from other column, then copy data

    Hi all!

    I have this macro problem that is driving me crazy.

    How do I build a macro that first loops through one column (col A) and then one by one compares col A's values to different sheet's col C finding a match eventually. Then copies some data from the matching row. The loop goes on and second value in col A gets to matched with col C's values.

    The number of rows in col A is unknown. Every value should have a match though in col C. When the match is found some data is copied from columns next to col C next col A in the same row.

    I know that this would be really easy to solve with VLOOKUP or INDEX & MATCH but the point is to have a macro to do this because there is so much data.

    I made a small excel example so it might be easier to understand what I'm after. I'm really stuck with making these two loops to work and would really appreciate help with them. Of the other stuff in the macro I might be able to manage (knocks on wood). Thanks a lot anyways, great forum!
    Attached Files Attached Files

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