+ Reply to Thread
Results 1 to 5 of 5

Inserting a sheet row based on condition

  1. #1
    Registered User
    Join Date
    01-09-2015
    Location
    The Netherlands
    MS-Off Ver
    2007
    Posts
    3

    Question Inserting a sheet row based on condition

    Hello,

    I've been experimenting with Macro's and VB for a little time and created some easy functions and modification, but this is just way beyond my reach and hoped maybe someone could help me out. I attached the Excel sheet to further clarify my case.

    I'm trying to insert a yellow row when the day changes, as you see in this Excel sheet, a yellow row is inserted every time the day changes in the E-column, i.e. from 15th of December to 16th of December, from 16th to 17th, from 17th to 18th, etc.

    Also, this yellow row should contain a SUM function in the F column, that counts the hours from the first row till the row before the inserted yellow row, and another SUM function in the N-column that subtracts this 'SUM of the column F', with the 'SUM of the N-column' that counts the hours from the first row till the row before the yellow. The second yellow row does the SUM functions between the first yellow row and the second yellow row, etc.

    Basically, all the rows - except for the yellow ones - are being generated automatically, and instead of adding the yellow rows manually, I'd like to automate it with a Macro. Sheet 1 is what the result should be, and Sheet 2 is the standard layout.

    Any help would be greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Inserting a sheet row based on condition

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-09-2015
    Location
    The Netherlands
    MS-Off Ver
    2007
    Posts
    3

    Re: Inserting a sheet row based on condition

    Wow! Amazing, this works. Thank you a lot!!!

  4. #4
    Registered User
    Join Date
    01-09-2015
    Location
    The Netherlands
    MS-Off Ver
    2007
    Posts
    3

    Re: Inserting a sheet row based on condition

    Wow! Works like a charm, thanks alot for your help! Not sure how to close this and what I can do to thank you for your time. Added reputation, but I can't really see how to close this thread.

  5. #5
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Inserting a sheet row based on condition

    you are welcome. To mark it as solved go to thread tools.. the reputation is more than satisfied with your big thanks.. (I dont know how to do it)

+ 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. Inserting blank rows based on condition
    By ananth22 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2015, 04:32 PM
  2. [SOLVED] [Urgent] Inserting Time sheet Data in to Master sheet Based On the Condition Using Macros.
    By kkcmania in forum Excel Programming / VBA / Macros
    Replies: 42
    Last Post: 05-17-2013, 07:56 AM
  3. Inserting extra row based on condition
    By nobleprince in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2010, 08:40 PM
  4. Inserting row based on condition
    By XL2008 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-04-2009, 01:03 PM
  5. inserting a row based on a condition.
    By Gary in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2006, 09:15 AM

Tags for this Thread

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