+ Reply to Thread
Results 1 to 5 of 5

Moving or copy data from three sheets (same workbook) into a new workbook based on cell

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    Netherlands
    MS-Off Ver
    Office 2010
    Posts
    4

    Moving or copy data from three sheets (same workbook) into a new workbook based on cell

    Dear all, i'm new here and struggling with a vba issue.

    I have a workbook with three sheets in it. They all are raw data (downloaded from a CRM program at my workplace). In another workbook i have a sheet called INDEX and VRD. VRD is basicly the cleaned data from the three sheets as i mentioned before. INDEX is a sheet whith calculations.

    What i want is to use a vba statement to copy the data from the three sheets based on a criteria. The criteria is the cellvalue (A2:A698) of sheet INDEX. So far i came up with this code:

    Please Login or Register  to view this content.
    So to continue: LOK should be the INDEX!$A2:$A698..... from here i'm stuck. Could someone help me out?

    So far thanks in advanced
    Attached Files Attached Files
    Last edited by Cutter; 09-15-2012 at 02:01 PM. Reason: Added code tags

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Moving or copy data from three sheets (same workbook) into a new workbook based on cel

    Hi sag74,

    Your code worked-and, I got A2:A57 for all the EW's - what is the problem?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-14-2012
    Location
    Netherlands
    MS-Off Ver
    Office 2010
    Posts
    4

    Re: Moving or copy data from three sheets (same workbook) into a new workbook based on cel

    Hi xladept,

    The problem is that i need to use workbook TEST and specific sheet INDEX col A row 2 to 698 as the criteria for LOK.

    LOK is the criteria for the statement.
    So far i came up with LOK =("C:\....[TEST.xls]INDEX!$A$2:$A$698.. but from here the code is generating error 1004(out of range etc)

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Moving or copy data from three sheets (same workbook) into a new workbook based on cel

    @ sag74

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

  5. #5
    Registered User
    Join Date
    09-14-2012
    Location
    Netherlands
    MS-Off Ver
    Office 2010
    Posts
    4

    Re: Moving or copy data from three sheets (same workbook) into a new workbook based on cel

    @ cutter,

    Thanks for mention it

    Regards

+ 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