+ Reply to Thread
Results 1 to 5 of 5

Find missing names in table from list and add row

  1. #1
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Find missing names in table from list and add row

    Hi all

    Please excuse the title i always have difficulty expressing my problem in a few short words. I have a list of names in sheet 1 and in sheet 2 I have a table comprised of data next to these names appearing in the same order as the list though often with duplicates. After i apply a filter (in the example attached it is FALSE) only the rows with TRUE remain visible and as such i lose some names( in the small expample sam and sonia). What i would like is code to search for the missing names in the table and in that event enter a row (maintaining the order of the list) with the mising name sam in the example A17 to reappear though with all the data deleted (this is important for later calculations). I apply the filter by the vba in the example. The hidden data is irrelevant aed and can be permanently deleted if necessary in fact that would be desirable all i need is for all the names in the list to be present in the table in the same order. Those that have been filtered to be present though with no other data in that row. I do not want all filtered names to reappear as in this example one instance of DAvid has been filtered though as he is still in the table that is not important. Finally to reiterate just ONE inserted row with name and no data for those that are missing.

    sorry for the novel i hope I have been clear.
    Regards
    Dan
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Find missing names in table from list and add row

    you requirement is not clear. I assumed the following

    you have a filtered data in sheet2(it is not clear why you have filtered with "true" as criteria)
    you want the rows with "false" in column C should be available but as a blank row.

    I am sending you back the file now called "cicadaT.xlsm". I copied the sheet2 and your orifinal data is available in sheet named "copy sheet 2" and I operated on sheet 2. the new macro "test" is in module 6 and also is repeated below.

    run this macro and see sheet2.(NOT the sheet "copy sheet2")
    is this what you want.

    Please Login or Register  to view this content.
    If this is not what you want give first few rows of sheet2 as you wantg.

  3. #3
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Find missing names in table from list and add row

    sorry I have not attached "cicadaT" file
    here it is
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: Find missing names in table from list and add row

    Thanks fore the response venkat,

    Sorry for my long winded description of my requirments. What you sent nearly did the trick. In the attached workbook you will see what i need, As you can see the blank for David has been removed, This is because David is already represented in A2:A3 all i need is for every name in the list to be accounted for hence why sam and sonia have been added in place of the blank in you example though I would like the other columns in those rows to remain blank. I hope my example table of teh desired results resolves any misunderstanding. Also would it make a difference to the code if there were more columns in the table and if so which part would i change. Thnaks alot for your help. much appreciated

    Regards
    Dan

  5. #5
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: Find missing names in table from list and add row

    forgot to attach the worksheet sorry here it is

    Dan
    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