+ Reply to Thread
Results 1 to 3 of 3

Attempting to search and insert in a larger database?

  1. #1
    Registered User
    Join Date
    08-10-2010
    Location
    California, CA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Attempting to search and insert in a larger database?

    Next question if anyone has time!

    This macro needs to be a bit more complicated, and unfortunately, I'm stuck again...

    What I'm looking to do this time is search between two preset points in a fairly large database for "major part numbers" (maj), go to a second worksheet and find the same major part number, then compare the "minor part numbers" (min) that are contained in the two. Then if possible insert the "minor part numbers" that are missing on sheet 1 at the end of the major part number. Hopefully someone followed that.

    So the sheet 1 looks like this;

    Start point
    MAJ1
    :min1
    :min2
    :min3
    MAJ2
    :min1
    :min2
    :min3
    :min4
    End Point


    Sheet 2 looks like this;
    ~blank row~
    MAJ1
    ~blank row~
    min1
    min2
    min3
    min4
    min5
    ~blank row~
    MAJ2
    ~blank row~
    min1
    min2
    min3
    min4
    ~blank row~


    And how I'd like sheet 1 to end up looking;

    Starting Point
    MAJ1
    :min1
    :min2
    :min3
    :min4
    :min5
    Maj2
    :min1
    :min2
    :min3
    :min4
    End Point

    Any help would be greatly appreciated again!!

    Thanks to all in advance!
    Last edited by jammen; 08-17-2010 at 01:50 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Attempting to search and insert in a larger database?

    You would do best to post a sample workbook showing Before and After.

    It should clearly illustrate your problem and not contain any sensitive data.

    Cheers

  3. #3
    Registered User
    Join Date
    08-10-2010
    Location
    California, CA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Attempting to search and insert in a larger database?

    Quote Originally Posted by Marcol View Post
    You would do best to post a sample workbook showing Before and After.

    It should clearly illustrate your problem and not contain any sensitive data.

    Cheers

    Ok!

    Here's an example WB with 3 sheets, the "major part numbers" are highlighted in blue, and the missing "minor part number" are highlighted in yellow on the second sheet.

    The third sheet shows how the first sheet should look after the macro is run.

    Let me know if I can clarify any farther!

    And thank you!
    Attached Files Attached Files

+ 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