+ Reply to Thread
Results 1 to 3 of 3

Insert rows if value doesn't exist

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Insert rows if value doesn't exist

    Dear all,

    Maybe someone could help me with the below.
    I have two sheets of data.
    Let's say:
    Sheet1 Column A:
    A123
    B962
    B973
    C921
    C922
    C924
    C925

    Sheet2 Column A:
    A123
    B965
    B973


    I would like macro to search if value from Sheet2 Column A exists in Sheet1 Column A.
    If not, then it should insert row in Sheet1 appropriately.
    From our example:
    A123 - exist
    B965 - doesn't
    B973 - exist.
    Macro should pick up B965 and insert row after B962 and paste value B965 to the inserted row.

    Any chance this could be achieved? Thank you!

    Kind Regards,
    S1n1

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Insert rows if value doesn't exist

    This may work if there are no numbers like A123 and B123.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Insert rows if value doesn't exist

    Hi!

    Thanks a lot for a reply. Unfortunately, there can be situation where number sequence is the same but first letters different.. Any idea hoe this can be solved?

    Thanks!

+ 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. Insert Row into Grouped Rows - Doesn't expand grouping
    By andrew c. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-28-2011, 04:22 PM
  2. [SOLVED] If Doesn't Exist Do Nothing
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2011, 04:26 AM
  3. Insert row if text doesn't exist
    By murzyn1975 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2009, 04:49 AM
  4. code to insert rows and add total - inserts rows, but doesn't add
    By thole in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-06-2009, 04:25 PM
  5. Does a tab exist or doesn't it?
    By rjwebgraphix in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2007, 08:57 AM
  6. Replies: 4
    Last Post: 06-18-2006, 01:10 PM
  7. search for worksheet, insert new if doesn't exist
    By cereldine in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2006, 12:15 PM
  8. Am I Looking For Something That Doesn't Exist?
    By seanryann in forum Excel General
    Replies: 12
    Last Post: 04-01-2006, 01:10 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