Results 1 to 9 of 9

Thread: VBA To Extract Data From Multiple Tables Based On Critera

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    20
    Rep Power
    0

    VBA To Extract Data From Multiple Tables Based On Critera

    This wasn't getting too much love in my thread R.E. another issue so I'm posting it titled appropriately.

    Essentially, what I am trying to do is get an automated way to copy all unique stock names and associated account names from two source tables in alphabetical order, without duplicates, to a final table. The stock names come from two sources: a positions table, and a history table.


    Criteria:

    1) It should only get stocks for accounts that exist in the Accounts Table (applies to the next two criteria).

    2) It should only get stocks from the Positions table from the predefined quarter/year (in the workbook, $O$17 and $O$18)

    3) It should only get stocks from the History table if the transaction quarter/year match the predefined quarter/year. If the stock has a settlement quarter listed, it should only grab the stock if those numbers (rather than the transaction quarter/year numbers) match the predefined quarter/year.


    I'm sure that doesn't make 100% sense so please see the attached workbook. I have an example Position table, History table, Accounts table, and what the final result table should look like. After looking at it, everything should be very clear.

    Thank you very much! I can work my way around formulas but VBA is a whole other ballpark for me and this is much needed.
    Attached Files Attached Files

Similar Threads

  1. Replies: 17
    Last Post: 05-22-2013, 11:58 PM
  2. Replies: 2
    Last Post: 03-05-2013, 07:34 AM
  3. VBA Code to Extract data
    By Howardc in forum Excel Help
    Replies: 1
    Last Post: 07-24-2012, 11:37 PM
  4. Replies: 7
    Last Post: 03-06-2012, 07:49 AM
  5. Extract multiple data matching with input
    By excel_learner in forum Excel Help
    Replies: 1
    Last Post: 02-13-2012, 06:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •