+ Reply to Thread
Results 1 to 8 of 8

Excel Macro help to copy/paste results using input values from a list box

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    Schaumburg, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Excel Macro help to copy/paste results using input values from a list box

    Hi,

    I have never done any macros but need to create one now, I was wondering if anyone could help. I tried "recording Macro" but it did not give me the result I wanted. What I am trying to do is perform a macro that takes a value from a list, inputs it into my data/assumptions and then copy and pastes teh final values on the sheet, or another sheet, whichever is easier.

    I have included an attachment of my spreadsheet to help explain.

    So I want to pick a value from my list A, B, C...., then the examples goes through calculations and I would like to take the bottom two rows (row 17, 18) and paste the values in AA4-AK4. Then go to the next value in my list and past again under the previous values, in AA5-AK5.

    Is this something a Macro can do? If so could anyone please help me? I am completely lost

    Thank you so much in advance!!!
    Attached Files Attached Files
    Last edited by kamila7; 01-13-2012 at 11:22 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Beginner need Macro help!

    Please read and adhere to these simple rules!

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more hours have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.
    Ben Van Johnson

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro help to copy/paste results using input values from a list box

    Hi kamila7
    This code in in the attached...see if it does as you require
    Please Login or Register  to view this content.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    01-12-2012
    Location
    Schaumburg, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Excel Macro help to copy/paste results using input values from a list box

    Hi Jaslake,

    Thank you so much for replying!

    So for the most part it does what I need it to do but one main thing, I was hoping it would go down through the values of the listbox without me having to tap each value in the listbox. So I was hoping it would just copy/paste all the values associated with the list box values automatically, but one under the other as yours does. Is this even possible? I am not having any luck finding anything about it.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro help to copy/paste results using input values from a list box

    Hi kamila7
    I think this is doable
    I was hoping it would go down through the values of the listbox without me having to tap each value in the listbox.
    Let me play with it a bit.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro help to copy/paste results using input values from a list box

    Hi kamila7
    Replace the previous code with this and see if it does as you require
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-12-2012
    Location
    Schaumburg, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Excel Macro help to copy/paste results using input values from a list box

    Jaslake

    UR a GENIUS!!!!!

    Thank you sooo sooo much!!!

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro help to copy/paste results using input values from a list box

    Hi kamila7
    You're welcome...glad I could be of help. If that satisfies your need, I'd appreciate it if you'll please mark your thread as "Solved".

    To mark your thread solved do the following:
    - Go to your first post on the thread
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solved
    - Click Save

+ 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