+ Reply to Thread
Results 1 to 4 of 4

Loop Macro for coyping and pasting values into a table

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Loop Macro for coyping and pasting values into a table

    I have a spreadsheet in which I am calculating certain metrics for a list of funds. I have attached a simplified version of the spreadsheet. There is a drop-down menu (C3) where you can select the fund. Once a fund is selected, certain fund statistics are calculated in Cells C7 and C8 based on data on data in another sheet (formulas ommitted in the attached version).

    I have just started playing around with macros so my knowledge in this area is fairly limited. I just wanted to create a smiple macro that selects each fund in turn and copies and pastes the corresponding calculated statistics into the table (N3:Q22).

    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Loop Macro for coyping and pasting values into a table

    Macro isnt needed. Use the =Lookup()

    Put in "C7" of your example.
    Please Login or Register  to view this content.
    Put is "C8" of your example.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-17-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Loop Macro for coyping and pasting values into a table

    Thanks stnkynts. Perphaps I wasn't clear in my original post but I am not seeking to lookup the values for Statistic 1 and Statistic 2 for each fund from the table (N3:Q22). Rather, I am trying to populate the table with the required values. C7 and C8 are currently shown as blank in attached sample spreadsheet but these Statistics will be calculated using data on other sheets in the full version of my spreadsheet. So, for example, if you Select Fund 1 from the drop down list in C1; cells C7 and C8 will automatically be populated in the full version of my spreadsheet.

    In order to populate the table (N3:Q22) I can either select each fund in turn from the drop down and then copy and paste the values for Statistic 1 and Statistic 2 (from C7 and C8) into the table or create a macro which carries out this process for me. I was seeking assistance in developing such a macro.

  4. #4
    Registered User
    Join Date
    10-17-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Loop Macro for coyping and pasting values into a table

    I have attached an updated spreadsheet which should more clearly illustrates what I'm trying to achieve. I really just need a simple macro that selects a fund,copies and pastes the calculated statistics into another table and then repeats the process for all the funds. Any guidance would be much appreciated.
    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