+ Reply to Thread
Results 1 to 6 of 6

VBA to transfer data to specific cells in another worksheet

  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    VBA to transfer data to specific cells in another worksheet

    Good morning!

    My grasp of VBA is extremely basic so I'm struggling to come up with a solution to this problem:

    I have a workbook with two worksheets. The first worksheet (Sheet1) has a macro that imports data from an external data source. Including:

    Cell H2 - week number eg. 1 to 52
    Cell M2 - a unique identifier number - alphanumeric
    Cell M27 - a numeric value

    The second worksheet is a database of the above information. I can't use a formula as the data in Sheet1 changes.

    What I'd like is a simple command button that looks up the week number and unique identifier and enters the value from cell M27 in the relevent place.

    Thanks

    Steve
    Last edited by SAsplin; 05-24-2011 at 10:22 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Need help coding a command button

    Where is the data?

  3. #3
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Need help coding a command button

    Example of spreadsheet attached.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Need help coding a command button

    Sample of spreadsheet attached.

    Anyone able to help?

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Need help coding a command button

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely 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 a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Your title is too vague
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: VBA to transfer data to specific cells in another worksheet

    Thanks Roy -

    Title updated to be a bit more specific.

    Steve

+ 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