+ Reply to Thread
Results 1 to 8 of 8

Adding new species to dynamic named lists

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Talking Adding new species to dynamic named lists

    Hi, hoping someone on here is able to help me?

    I have a macro which enters species level data into an excel spreadsheet. The user selects the family from a drop down list, and then each species within that family (to avoid selection of species in other families, and to make selection quicker). This species data is stored in a separate sheet with named range dynamic lists.

    The problem I have is adding new species to the current lists when we observe new species. I want to have a second macro within the data entry form where users can add a new species to the list, but the list needs to be selected based on the list name (which is the family name).

    How can I tell the macro to "lookup" the family name in the range of lists, and then add the new species name to the bottom of that list?

    thanks all! looking forward to your answers

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Adding new species to dynamic named lists

    The answer is depending greatly on your current design/form/code. Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Adding new species to dynamic named lists

    Hi,

    Thanks for this, have attached the file here, currently all species info is added onto the bottom of the reference list (which is needed for later analysis) but I also want to add only the "common name" to the relevant family species list in the 'Species' sheet, using the English family name to find the relevant list.

    thanks
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Adding new species to dynamic named lists

    This is my idea of AddSpecies macro, notice all the selecting and such is gone? We address our commands to the specific sheets/ranges without activating or selecting:
    Please Login or Register  to view this content.
    Also, I deleted the 3 white rows at the top as unnecessary. The COPY command takes the data right from the cell you edit, which are in row 7 after you delete those white rows.

    The macro to take you to the Add a species sheet:
    Please Login or Register  to view this content.
    My version of your Enter_Data_1 macro:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Adding new species to dynamic named lists

    Hi, Thanks for this, it is great to be able to see how to make the macro much more simplified and neat. I still need to be able to add the common name of the species to the named range in the species worksheet. For example, If I add Longnose Filefish, I need just this name added onto the end of the Filefish list in the "Species" worksheet.

    Thanks again for all your help so far.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Adding new species to dynamic named lists

    Try this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Adding new species to dynamic named lists

    Thank you! This is just what I needed! Wonderful!

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Adding new species to dynamic named lists

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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