+ Reply to Thread
Results 1 to 8 of 8

populate list with each new value

  1. #1
    Forum Contributor
    Join Date
    10-07-2015
    Location
    cyprus
    MS-Off Ver
    Microsoft 365
    Posts
    182

    populate list with each new value

    I have a file with 3 spreadsheet and one called "parameters" with list for data validation purposes.

    I would like that each time a new value is entered in column 2 of one of the three other sheets (in my example, the code is under "H&M" sheeet), a macro goes to "parameters", column 5, look if the new value exists in the list, if yes nothing, if no, add the new value, and sort the list alphabetically before going back to initial sheet.

    My problem is the .find code to look into "parameters", range E., i get a "type mismatch" error.

    Can someone help?
    Attached Files Attached Files

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: populate list with each new value

    This will find your value in the list, you will have to work from there

    Please Login or Register  to view this content.
    Last edited by nigelog; 09-08-2021 at 10:38 AM.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: populate list with each new value

    Remove all code from the Sheet modules and try this one in ThisWorkbook module.

    Also I would make your Vsl range a dynamic one to avoid all the empty rows at the bottom.

    Please Login or Register  to view this content.
    Last edited by bakerman2; 09-08-2021 at 11:03 AM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    10-07-2015
    Location
    cyprus
    MS-Off Ver
    Microsoft 365
    Posts
    182

    Re: populate list with each new value

    It works perfectly, i amend it in order to perform the macro if a new value is entered in column 2 of any of the first 3 sheets of the workbook ( or "H&M&, or "crew health" or "A&I P&I"),

    Is there a way that when it add the new value in sheet "parameters" column 5 , it does it as per "parameters" format, without adding a new step copying the format?

    cause it add it but as per initial sheet format (ex in red center) while in "parameters" it's in black
    Attached Files Attached Files

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: populate list with each new value

    adapting Bakerman's code
    Please Login or Register  to view this content.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: populate list with each new value

    In ThisWorkbook module.

    Please Login or Register  to view this content.
    Fontcolor was a remainder of earlier attempts , just had to put entire column E back to Automatic.

    Changed your Datavalidation to a Dynamic Range to avoid empty rows at the bottom.(only1 now to allow new entries)
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-07-2015
    Location
    cyprus
    MS-Off Ver
    Microsoft 365
    Posts
    182

    Re: populate list with each new value

    thank you so much all works perfectly

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: populate list with each new value

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Replies: 10
    Last Post: 08-01-2018, 01:15 PM
  2. Replies: 1
    Last Post: 11-05-2013, 12:40 AM
  3. Populate list from single click, add to list from additional clicks.
    By Pewpewpew in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-19-2013, 02:07 PM
  4. Replies: 7
    Last Post: 06-12-2013, 07:09 PM
  5. Replies: 2
    Last Post: 02-03-2013, 02:43 AM
  6. Replies: 3
    Last Post: 02-28-2012, 11:54 AM
  7. Replies: 4
    Last Post: 02-08-2012, 03:14 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