+ Reply to Thread
Results 1 to 3 of 3

Macro to insert rows is not working accurately

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2013
    Posts
    11

    Macro to insert rows is not working accurately

    Assistance please- Every week and at the end of each month, for project costing/ customer invoicing, I download time entries. The download includes quite a bit of data that I decipher/organize via macros. While all self-taught, I am running into difficulty with inserting 2 empty rows accurately once cell values have changed.

    Attached is a file that includes what the data looks like after my first macro. The data is sorted by Author, Contract, and Customer. The need is to insert 2 rows when the contract and customer change. When I run my insert 2 rows macro, it is not inserting the rows where it should.

    Once the data is sorted and the 2 rows are inserted, I subtotal each set and a total at the end.

    Would someone be able to help me on 2 issues: first, correct my macro so that the 2 rows are inserted accurately; is it possible to create a macro that will sub-total and also total all of the sums?

    Many thanks for assistance
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to insert rows is not working accurately

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-24-2013
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Macro to insert rows is not working accurately

    John - Thank you for your quick response and hard work! I have spent at least 20 hours on the insert rows macro alone
    so your help is greatly appreciated.

    The sub-total and summing total is fantastic! Can you point me to where I can cut and paste this as a separate macro?
    [/I]
    For some reason it's not recognizing the cell value difference for the contract and customer columns (E&F). I can see that
    you included both columns in your code - which makes sense. I didn't know how to do that but I understand the need.

    I've attached the modified file with a tab sheet that ran your macro; I inserted brackets for an example of where
    it's not catching the change of cell value. I included 'scratch' sheets for test use.

    Assistance and thoughts are greatly appreciated.
    Attached Files Attached Files
    Last edited by D794913; 12-02-2016 at 12:29 PM. Reason: To refresh post and hopefully get a response.

+ 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. Macro to insert rows is not working accurately
    By D794913 in forum Excel General
    Replies: 1
    Last Post: 11-22-2016, 03:18 PM
  2. Replies: 9
    Last Post: 02-09-2016, 11:42 AM
  3. Replies: 2
    Last Post: 04-19-2015, 01:36 PM
  4. [SOLVED] Insert Row Macro not working all of a sudden...
    By rjw524 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-01-2015, 12:33 AM
  5. Replies: 8
    Last Post: 08-16-2014, 01:27 PM
  6. [SOLVED] Insert Row macro not working
    By Acct Supr - DCTC in forum Excel General
    Replies: 3
    Last Post: 10-06-2005, 09: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