+ Reply to Thread
Results 1 to 2 of 2

Inserting Lines by macro and conditional formatting

  1. #1
    Registered User
    Join Date
    03-12-2011
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    19

    Inserting Lines by macro and conditional formatting

    Hi All,

    I set up my spreadhseet so the "data entry" pages have nice conditional formatting giving new colors for each year. This was the start of my VBA quest...
    2000
    2000
    2001
    2001

    Next I thought it would be a good idea to put a line between the different dates using:

    Please Login or Register  to view this content.
    The code worked exactly as advertised giving me:
    2000
    2000
    Blank line - no color
    2001
    2001

    BUT...the conditional formatting was absent on the rows which were inserted! So if I typed 2001 in the "Blank Line" it would not change the color as all the other 2001's and the actual condition rules changed to ignore the newly inserted line.

    Does anyone have any thoughts on how I can correct this? I know I could write an entire macro to rearrange everything and make the right colors...But, that would be way overkill! If it is a simple(ish) fix I'd like to try, but this is the final cosmetic change to my spreadsheet, so it is not completely necessary.

    Thank you!

  2. #2
    Registered User
    Join Date
    03-12-2011
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Inserting Lines by macro and conditional formatting

    After some searching and pondering over the weekend...I found a script which does what I need by offsetting the lines. It's not a million miles from the script I was using...but it worked out of the box.

    Please Login or Register  to view this content.
    Last edited by DrSteve; 03-28-2011 at 08:24 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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