+ Reply to Thread
Results 1 to 6 of 6

Automatically create and fill sheets and then save as seperate files

  1. #1
    Registered User
    Join Date
    02-26-2010
    Location
    Manchester,NH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Automatically create and fill sheets and then save as seperate files

    I am trying to get excel to create trade tickets as new Sheets based upon information I paste into sheet1. This information includes(In this order) Date, Account, Source, Quantity, Commission, FBSI Shortname, Amount, Txn Code, Txn Key, Symbol, Price, Interest Amount, Comments, Settlement Date, Broker, Cusip, Security Description, Security Type, Fund ID, Key Code, Core Fund, and TPA Order Guide.
    I would only like to reference the date, acct #, Quantity, commission, FBSI Shortname, Amount, TXN Key, Symbol, and Price when creating the new sheets.
    The trade ticket is already designed in sheet two 'MasterTicket':
    Date (m/dd/yyyy)=D2
    Price ($)=F5
    Symbol (Ticker Symbol)=B6
    Security Descript (Text)=C6
    Acct#(AlphaNumeric)=A9
    Txn Key=E5(In Large Caps if possible)
    Type(#)=B9:B?
    Quantity(# w/5Decimals)=C9:C?
    Commission($)=D9:D?
    FBSI Shortname(text)= E9:E?
    Amount($)=F9:F?
    At the bottom of the data is a row that totals the Quantity and Amount that needs to always be there.
    Then I'd like to save each sheet as a seperate file named-
    (YYYY)-(mm)-(dd) "Block Trading Form"(TXN Key)(Symbol)

  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: Automatically create and fill sheets and then save as seperate files

    Sounds perfectly doable. Post up that workbook with a good set of testing data in sheet1 and we'll take a look.

    Click GO ADVANCED and use the paperclip icon to post up 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
    02-26-2010
    Location
    Manchester,NH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Automatically create and fill sheets and then save as seperate files

    Thanks for responding so quick! Here it is
    I've Included sheets that have all the symbols I work with, as well as an options sheet that has the Underlying symbol as the header, with all available option symbols in each respective column. Can these be dynamic lists?
    Also, the (YYYY-MM-DD) for the file name should be the date of the transaction, not the date the file is created.
    Attached Files Attached Files
    Last edited by Focus_Kevin; 02-26-2010 at 05:08 PM.

  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: Automatically create and fill sheets and then save as seperate files

    Sorry, I don't see what you want help with. You want a macro that fills out the SymbolMaster sheet with information from the Test Data sheet? Then copy the SymbolMaster sheet off to a workbook of it's own and save it?

    What is the basis? Can you fill out 2-3 example sheets so we can try to see your logic in action? That will make automating it easier.

  5. #5
    Registered User
    Join Date
    02-26-2010
    Location
    Manchester,NH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Automatically create and fill sheets and then save as seperate files

    I created all the tickets that would be from the data. I also included some notes in cells, as well as on a seperate sheet.


    This is my first VBA project...I hope I'm helping...
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-26-2010
    Location
    Manchester,NH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Automatically create and fill sheets and then save as seperate files

    I used this macro to sort the data into proper groups.
    Sub TradeDataSorter()
    '
    ' TradeDataSorter Macro
    ' Macro recorded 3/1/2010 by kevin
    '

    '
    Cells.Select
    Selection.Sort Key1:=Range("P2"), Order1:=xlAscending, Key2:=Range("I2") _
    , Order2:=xlAscending, Key3:=Range("B2"), Order3:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    End Sub

+ 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