+ Reply to Thread
Results 1 to 9 of 9

Add border line above first row with a future date

  1. #1
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Add border line above first row with a future date

    I have set up a bank register file.

    I would like to add a border line above the first row with a future date.

    Currently my register only inserts the current date in col A
    when an entry is made in Col C (same row).

    I would like this line to show as soon as the worksheet is opened.
    Last edited by ChrisXcel; 05-18-2017 at 06:57 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Add border line above first row with a future date

    I'm afraid you are going to have to provide a sample file. What you have and what you expect.
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: Add border line above first row with a future date

    OK well here is my sample file.
    I would like to have a blue border line added to the first future date row,
    (the top border of the cells)
    Right now the line is supposed to be blue but doesn't show as such.
    It would be nice to have it a little thicker too.
    Attached Files Attached Files
    Last edited by ChrisXcel; 05-18-2017 at 08:18 PM.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Add border line above first row with a future date

    How about this:
    Attached Files Attached Files
    Quang PT

  5. #5
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: Add border line above first row with a future date

    Thanks bebo.
    Well visually it looks quite nice.

    But there are a few problems though.
    If you looked at my VBA code it is set up to select the first empty cell in Col C.

    When that cell is populated the Date is entered automatically.
    When the entry for the row is completed, the file is saved, the data is sorted by date and the last row of Col C is selected again.

    None of that is present with what you showed.
    And I don't see code to make the border line for future dates?

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Add border line above first row with a future date

    For some reasons I could not open code
    The border line is set by Condition formatting which you can find in Data menu

  7. #7
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: Add border line above first row with a future date

    Quote Originally Posted by bebo021999 View Post
    For some reasons I could not open code
    The border line is set by Condition formatting which you can find in Data menu
    Sorry, I had removed the VBA code when I made the new file for this site.

    I think your Condition formatting can work but there's just one problem..
    Before I entered your code, my cells already had a conditional formatting that
    alternated the color of the rows, white/blue/white etc.

    I found that when your new code came into affect (there was a future date)
    it did find it, and it did put the line along the top of the cells.
    That was the good part.

    The bad part was that the row of cells lost their proper color.
    So if the row was supposed to be blue, it was now regular white.


    Also, how did you copy/set your conditional formatting code so that it affects Col. A:H?
    I'm not sure how to do that.
    Thanks!
    Last edited by ChrisXcel; 05-19-2017 at 05:01 PM. Reason: New discoveries...

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Add border line above first row with a future date

    Conditional formatting might be overriding the entire formatting of the associated cells. I'd need to see the actual workbook with all the code installed.

    To upload this file, make a copy, leave all code in place, reduce the number of rows to a nice small sample, 15-20 rows, and make sure the data is desensitized without affecting the stuff we're looking at.

    Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  9. #9
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: Add border line above first row with a future date

    Quote Originally Posted by JBeaucaire View Post
    Conditional formatting might be overriding the entire formatting of the associated cells. I'd need to see the actual workbook with all the code installed.

    To upload this file, make a copy, leave all code in place, reduce the number of rows to a nice small sample, 15-20 rows, and make sure the data is desensitized without affecting the stuff we're looking at.

    Thanks.
    Thank you for offering to help!
    Here is the file. I hope you can take a look at it and perhaps find out what the problem 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)

Similar Threads

  1. [SOLVED] Border Line issue
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-13-2015, 05:07 PM
  2. How to add a border line automatically?
    By misterno in forum Excel General
    Replies: 8
    Last Post: 04-01-2013, 03:47 PM
  3. How can I do away with the border line here?
    By elton.li in forum Excel General
    Replies: 3
    Last Post: 10-11-2010, 12:13 AM
  4. Extend Border line
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2010, 03:54 AM
  5. Border line to every selected row
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2010, 08:50 PM
  6. Replies: 7
    Last Post: 11-16-2008, 05:48 PM
  7. Replies: 2
    Last Post: 01-30-2006, 11:20 AM

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