+ Reply to Thread
Results 1 to 3 of 3

Program to move data from one worksheet to another

  1. #1
    Registered User
    Join Date
    11-03-2010
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2010
    Posts
    65

    Program to move data from one worksheet to another

    Hello and thank you in advance for your help. I am new to excel. I need to allow a user to enter 5 sotre number and then click a button. Once the button is clicked, the program needs to look at each record the user entered and find all the relevant data in a different worksheet and copy it to a designated worksheet.

    Sheet1: (user enters)
    a1
    123
    456
    789

    Sheet2: (Data)
    a b c d
    123 alksfhalskdf kjhklhlkjh klhkljhkljhk
    123 alksfhalskdf kjhklhlkjh klhkljhkljhk
    456 alksfhalskdf kjhklhlkjh klhkljhkljhk
    789 alksfhalskdf kjhklhlkjh klhkljhkljhk
    999 alksfhalskdf kjhklhlkjh klhkljhkljhk
    999 alksfhalskdf kjhklhlkjh klhkljhkljhk
    789 alksfhalskdf kjhklhlkjh klhkljhkljhk
    888 alksfhalskdf kjhklhlkjh klhkljhkljhk

    RESULTS: (Differetn worksheet)
    a b c d
    123 alksfhalskdf kjhklhlkjh klhkljhkljhk
    123 alksfhalskdf kjhklhlkjh klhkljhkljhk
    456 alksfhalskdf kjhklhlkjh klhkljhkljhk
    789 alksfhalskdf kjhklhlkjh klhkljhkljhk
    789 alksfhalskdf kjhklhlkjh klhkljhkljhk

    Hope this is pretty straighforward....THANK YOU!
    Last edited by bosco2; 04-04-2011 at 01:38 PM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Program to move data from one worksheet to another

    Hi bosco2
    its untested but you can adapt...
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Program to move data from one worksheet to another

    one of the options to do that, save attachment and make sure the following reference is on:

    1. [Alt+F11] - open Visual Basic window
    2. Tools - References - find and tick "Microsoft Activex Data Objects 2.0 Library"
    3. Press "Start" button on Sheet "result"

    Please note that sheets names are hardcoded in macro. In case you change sheet names you'll need to change sheet names in the code as well.
    Attached Files Attached Files
    Last edited by watersev; 04-03-2011 at 11:23 AM.

+ 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