+ Reply to Thread
Results 1 to 9 of 9

code to insert rows and add total - inserts rows, but doesn't add

  1. #1
    Registered User
    Join Date
    05-04-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    code to insert rows and add total - inserts rows, but doesn't add

    This code is supposed to it finds in from each cell as long as each cell is the same, then look for other cells

    The end result is supposed to look like this:

    CH01
    100 2
    101 2
    CH01 Total $200


    But I get this:


    CH01
    100 2
    101 2
    CH01 Total

    And it runs only once, when it is supposed to go through all data (CH01, H02, CH03, DA01, etc...) in all rows up to row 17

    Any ideas?

    Please Login or Register  to view this content.
    Last edited by thole; 05-05-2009 at 09:47 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: code to insert rows and add total - inserts rows, but doesn't add

    Please read the forum rules, and then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: code to insert rows and add total - inserts rows, but doesn't add

    Thank you.

    Comment out turning off screen updating and step through the code to see what happens.

  4. #4
    Registered User
    Join Date
    05-04-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: code to insert rows and add total - inserts rows, but doesn't add

    The Code runs, but I get only 1 sheet created, whereas it is supposed to create a sheet for each different item.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: code to insert rows and add total - inserts rows, but doesn't add

    So, you have a loop, you step through it, and figure out why it doesn't continue.

  6. #6
    Registered User
    Join Date
    05-04-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: code to insert rows and add total - inserts rows, but doesn't add

    which is exactly the thing I cannot figure out - tearing my hair out!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: code to insert rows and add total - inserts rows, but doesn't add

    Post a workbook with the code that demonstrates the failure.

  8. #8
    Registered User
    Join Date
    05-04-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: code to insert rows and add total - inserts rows, but doesn't add

    Here it is.

  9. #9
    Registered User
    Join Date
    05-04-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: code to insert rows and add total - inserts rows, but doesn't add

    Sorry - here it actually is.
    Attached Files Attached Files

+ 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