+ Reply to Thread
Results 1 to 6 of 6

Macro that creates template based on list

  1. #1
    Registered User
    Join Date
    10-09-2009
    Location
    Cambridge, MA
    MS-Off Ver
    Excel 2003
    Posts
    61

    Macro that creates template based on list

    Hello!

    I am trying to create a macro that automatically creates a template based on inputted cell values and I have attached a simple excel file to help explain what I am hoping to do. On one sheet, I have a big list of different securities, many of which are owned by multiple portfolios. On the template sheet, I would like to create a macro that, when you insert the security name in a cell and the action (buy, sell, etc.), it automatically creates a "template" below that looks up all the different owners and lists them.

    In the spreadsheet, I have an empty template sheet and a "sampletemplate", which is an example of what should happen when you run the macro.

    The template will be a running list, so if the macro could add the next series of entries on the first blank row, that would be amazing.

    If anyone has any ideas on how to make this work well, please let me know. Thank you so much for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro that creates template based on list

    hi nofzinger, option, I've added Action column on Data sheet. Enter value in Template sheet range B1 and/or B2 and press the button
    Attached Files Attached Files
    Last edited by watersev; 02-07-2013 at 05:55 PM. Reason: file updated

  3. #3
    Registered User
    Join Date
    10-09-2009
    Location
    Cambridge, MA
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Macro that creates template based on list

    thanks, that's certainly much closer than I got. However, i don't need an "action" column; i just want all the same securities listed and then just put what you write in cell B2 on sheet template in column E (the action column). So, if you put gold and "buy", it would find all the golds and list them, putting "buy" in the action column....

    thanks!

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro that creates template based on list

    please check attachment
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-09-2009
    Location
    Cambridge, MA
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Macro that creates template based on list

    You're amazing. Thank you!

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro that creates template based on list

    amended code for no stock found result
    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