+ Reply to Thread
Results 1 to 12 of 12

Having trouble with macro coping data to sheet2

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Having trouble with macro coping data to sheet2

    I have a macro for a button that isnt fully working. what it does it looks at data on sheet1 for data in columns I-L all the way down and it there is data in Column I it copies I-L row over to sheet2 and puts info in same order in sheet2 A-D and then looks at values in column D on sheet2 and whatever number is there makes that many copies (-1) under it and does this for all. So another words if column D on sheet2 says 12 it makes 12 - 1 copies and puts it right under that row so theres a total ** 12 ** those rows. which this works perfect what isnt working fully is on sheet1 theres some rows with data in Column I that it doesnt see or something so it doesnt copy that row (I-L) over and some rows it does .... cant figure it out heres my code.

    It also auto widths both sheets.

    Please Login or Register  to view this content.
    Last edited by Asphalt_Cowboy; 03-08-2014 at 08:04 PM.

  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: Please help ... not fully working

    It looks like it quits after seeing 10 blanks in Column I?

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Please help ... not fully working

    i will do that but this spreadsheet is for shipments sometimes 100 items are shipped sometimes 9000 but i will upload them in 10 min or less

  4. #4
    Registered User
    Join Date
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Please help ... not fully working

    I have them in Links because the files said to large to use uploader to they are in drop box. I have the macros there for u to see.

    Blank one
    https://www.dropbox.com/s/dj4zywv6q7...20Template.xls


    Final one what its supposed to look like
    https://www.dropbox.com/s/arvwg2t1c0...%20like%29.xls

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

    Re: Having trouble with macro coping data to sheet2

    Hey Cowboy,

    Your sheet is protected - can I have the password?

    Nevermind: I may have found the problem:

    Change:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.
    Last edited by xladept; 03-08-2014 at 10:03 PM.

  6. #6
    Registered User
    Join Date
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Having trouble with macro coping data to sheet2

    Quote Originally Posted by xladept View Post
    Hey Cowboy,

    Your sheet is protected - can I have the password?

    Nevermind: I may have found the problem:

    Change:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.
    I PMed the password but i thought i removed them

  7. #7
    Registered User
    Join Date
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Having trouble with macro coping data to sheet2

    I just tried what you suggested i ran it (with both sheets having no password as script has them removed) and it did the first product with 6 items then stopped (with no error) before it did half the products copying them over and forgetting some.

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

    Re: Having trouble with macro coping data to sheet2

    But the problem definitely lies within the indexing - I don't need the password, but I don't know when I'll be able to get back to it - if you single step through the code, just comment out the formatting lines at the start and you should be able to see where it's skipping input rows.

  9. #9
    Registered User
    Join Date
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Having trouble with macro coping data to sheet2

    I will try but i am a rookie VBA creator still but i try to take in all i can and research all i can

  10. #10
    Registered User
    Join Date
    12-03-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Having trouble with macro coping data to sheet2

    Got everything straightened out its working perfect now. I will run it through a few shipments and see if i get any new problems. Thanks for everything!

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

    Re: Having trouble with macro coping data to sheet2

    Hi Cowboy,

    I did it too - here's mine:

    Please Login or Register  to view this content.
    And, thanks for the rep!

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

    Re: Having trouble with macro coping data to sheet2

    Oh Cowboy,

    Got everything straightened out its working perfect now. I will run it through a few shipments and see if i get any new problems.
    That's wonderful and the skill of Single Stepping is the programmer's secret weapon - way to go!

+ 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. Does xl2011 fully support VBA?
    By skysurfer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-28-2010, 11:54 AM
  2. Failure to fully open
    By thonikman in forum Excel General
    Replies: 1
    Last Post: 11-24-2008, 09:43 AM
  3. Excel won't open fully
    By mpeplow in forum Excel General
    Replies: 1
    Last Post: 06-09-2007, 11:33 AM
  4. Fully functional spreadsheets on web?
    By famdamly in forum Excel General
    Replies: 4
    Last Post: 04-18-2006, 05:21 AM
  5. [SOLVED] xl environment not fully functional
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2005, 05:05 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