+ Reply to Thread
Results 1 to 8 of 8

VLookup and Match column header

  1. #1
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    VLookup and Match column header

    Hello,

    I have a problem I hope someone will be able to help me with. I am creating a database of information provided by different people using VLookup. Each person will complete one excel form and the results will be saved as separate files. All the information is then compiled into one database for further use. So far it works fine as long as the data for each person is included only once. If I update the information in the individual files and import it a second time into the database, it will be included as a completely new entry (i.e. a new column). What I want to do is for the macro to first look to see if that person already has a column and if so, then update that column without adding a new column. If no previous entry exists, then import all the data in the next available column (as it does now). One last point, I want the macro to get user verification before replacing the contents of a column if it already exists. This is just as a safety mechanism. I think this needs a combination of VLookup and Match but I don't know how to add this code to the existing macro.

    Thanks in advance.

    abousetta

    P.S. Attachment contains a dummy database and two dummy files with information to update in the database.
    Attached Files Attached Files
    Last edited by abousetta; 05-11-2010 at 06:08 PM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: VLook and Match column header

    Does anyone know if Vlookup and Match works in this situation? I am trying to modify the code but have had no luck so far. Any help is highly appreciated.

    Thanks.

    abousetta

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: VLook and Match column header

    Is there anything I can clarify? Please let me know.

    abousetta

  4. #4
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: VLook and Match column header

    I've changed "Import_Data()" to do what you want and uploaded it with a new name. Including it here also.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: VLook and Match column header

    Thanks foxguy. I will try it and let you know if I hit any snags. Thanks again for taking time to help me out with this problem.

    Best wishes,

    abousetta

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: VLook and Match column header

    Thanks again foxguy. It works great!

    Best wishes,

    abousetta

  7. #7
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: VLookup and Match column header

    From Private Message
    Please Login or Register  to view this content.
    abousetta;

    Forum Rules #4
    4. Don't Private Message or email questions to moderators or other members. All questions and answers will benefit other posters like yourself. The point of having a public forum is to share solutions to common (and sometimes uncommon) problems with all members.

    That said, here is a solution;
    Please Login or Register  to view this content.

  8. #8
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: VLookup and Match column header

    Thanks foxguy for all your help and for pointing out my conflict with one of the forum rules. Additionally, I would like to make a public apology to everyone since as foxguy noted this is a public forum and the discussions should be transparent so that everyone can benefit from the process.

    abousetta

+ 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