+ Reply to Thread
Results 1 to 6 of 6

macro for user input then copy cells from worksheet and paste into another worksheet

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    Canberra, Australia
    MS-Off Ver
    2003,2010
    Posts
    11

    macro for user input then copy cells from worksheet and paste into another worksheet

    Hi,

    I am planning to put a button to run the macro on the 'Summary' Tab.

    I would like the macro to prompt the user to Input a 'name' - which could include a number, then based on the 'name', the address information from other fields be populated to the summary worksheet.

    I have attached workbooks for clarification.

    Eg. 'Name' 'Mike1' is found in cell 'A4' on worksheet 'Data Source'
    Values to be copied from Cells 'A4' - 'D4' worksheet 'Data Source' and pasted into worksheet 'Summary' into cells 'C3 - C6'

    Any assistance to write this macro I appreciate!

    With Thanks

    Penn
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: macro for user input then copy cells from worksheet and paste into another worksheet

    Here's your code

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-04-2014
    Location
    Canberra, Australia
    MS-Off Ver
    2003,2010
    Posts
    11

    Re: macro for user input then copy cells from worksheet and paste into another worksheet

    Wow... thanks. That macro worked exactly right.

    If you are happy to assist me further, I have another purpose that I would like to use this macro for and that's for if the 'Summary' worksheet was in a separate workbook to the 'Data Source' worksheet.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: macro for user input then copy cells from worksheet and paste into another worksheet

    Need additional information?
    1. What are the names of the workbooks?
    2. Will both workbooks have all data and results on Sheet1? or will the names be as indicated earlier?
    3. Will both workbooks be open when you run the macro?
    4. If 3 is false, what is the path to the DataSource Workbook?

  5. #5
    Registered User
    Join Date
    11-04-2014
    Location
    Canberra, Australia
    MS-Off Ver
    2003,2010
    Posts
    11

    Re: macro for user input then copy cells from worksheet and paste into another worksheet

    Name of the workbooks are
    'Address' and 'Data Source'
    Results will display on Sheet 1 of the 'Address' Workbook.
    Only the 'Address' workbook will be open when I run the Macro.
    The path of the Data Source Workbook is 'H:\MyDocuments\Macro'
    Thanks

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: macro for user input then copy cells from worksheet and paste into another worksheet

    Give this a try. It works for me when I tested.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA to copy cells from one worksheet to another on user input
    By angelus430 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2014, 04:01 PM
  2. [SOLVED] Macro to Copy Master Worksheet create and paste in new auto named worksheet
    By TheRealLethality in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 12:46 AM
  3. [SOLVED] Help with Macro to Copy/Paste cells to different worksheet based on Value
    By BehrBrew in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2013, 06:41 AM
  4. [SOLVED] Trying to copy and paste certain cells from one worksheet to another using a macro
    By renec in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-26-2013, 11:55 PM
  5. Copy/Paste user input info into another worksheet
    By MarkExcelMark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2011, 04:18 PM

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