+ Reply to Thread
Results 1 to 12 of 12

Copy Data to New Sheet, Starting in a Specific Row

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    9

    Copy Data to New Sheet, Starting in a Specific Row

    Hi all, My First post, so forgive me if I dont give the Right information.

    I am Trying to copy All The Data in Column H of my master Sheet to an Invoice Template that I have Created.
    This Code:

    Please Login or Register  to view this content.
    Copies the Data correctly to Column A on the New Sheet, However, I need it to Start entering it on ROW 9 to avoid overwriting the Header of the Invoice. Any Ideas on what is wrong?
    Last edited by RTOMikey; 03-23-2013 at 09:36 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy Data to New Sheet, Starting in a Specific Row

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy Data to New Sheet, Starting in a Specific Row

    Thank You,That Worked Perfectly, however, when I finished the Code,it was too large, so I am trying to put it in to a for/next loop, where the Variables come from a seperate sheet.
    The Sheet (Companies) issetup withColums A-D holding the Different Variables. A, B, D are simple text, C, I need to put the Variable , arCrits, in. it is entered into the Cell as array("5706441757","5706481767")

    the Code I am using is
    Please Login or Register  to view this content.
    When running the code, it sucessfully pulls shorg and shdes, however, fails on arCrits with Runtime error 13, Type Mismatch.... What am I doing Wrong?

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy Data to New Sheet, Starting in a Specific Row

    attach a sample file

  5. #5
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy Data to New Sheet, Starting in a Specific Row

    http://24.229.3.24/TZP/TestModule.xlsm

    Not Sure how to attach a file, but here is a link to the test file I am using

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy Data to New Sheet, Starting in a Specific Row

    this is the wrong line
    Please Login or Register  to view this content.
    arCrits is an array, you can not assign a value, maybe
    Please Login or Register  to view this content.
    is correct

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Data to New Sheet, Starting in a Specific Row

    Please Login or Register  to view this content.
    Would be incorrect as the array has not be redim


    Please Login or Register  to view this content.
    then

    Please Login or Register  to view this content.
    You can change the value of 2 and 3 as long as they are with in the boundry of redim

  8. #8
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy Data to New Sheet, Starting in a Specific Row

    ok, not quite sure how to use that..... Let me try to explain better, The line I am trying to write into an array is different Phone Numbers to be billed to a customer...... I can either bunch them all in a single cell, as I tried in my last example, which obviously didn't work the way I wanted, Or I can put them one number at a time in the Cells starting with ColumnE outward. What I can't figure out is how to make the array Read the Specific Row that is called in the Loop, Count the number of cells From Cell E Right, and read them into the Array.

    When I had it this way, I was putting the FULL text of the array into the cell, and hoping that arCrits= would take the Textual and realize that it was an array.
    Please Login or Register  to view this content.

    I have updated the Previous ling with where I am at right now, and am in Crunch Time as The old Billing System is no longer workable, and I have 3 days to billing cycle. Any Help or suggestions on how to fix this ONE problematic peice of Code would be appreciated, as it is all that is not functioning right

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Data to New Sheet, Starting in a Specific Row

    One way,
    First you need to load the data in range E to an array and you then loop through each array

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy Data to New Sheet, Starting in a Specific Row

    That should work, but wouldn't it pull Row 2 eveytime it goes througgh the loop? I need it to take Row n as in my example.....

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Data to New Sheet, Starting in a Specific Row

    Sorry!
    You are right!
    Should be

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy Data to New Sheet, Starting in a Specific Row

    After lots of hunting, and googling and calling all my old college buddies, I finally found what I needed


    Please Login or Register  to view this content.
    Works like a champ... I save all the Array in the Spread sheet in Column E, delimited by ; and it puts it in the array.... Thank you all for trying to help me though.

+ 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