+ Reply to Thread
Results 1 to 6 of 6

Border around all cells in a column range to last row.

  1. #1
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Border around all cells in a column range to last row.

    Hi All,

    I'm trying to create a border around all the cells in a column range that stops at the last used row. Attached is what I'm trying to work with.

    HTML Code: 

    Thanks,

    E.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Border around all cells in a column range to last row.

    Hello,

    so, if the cell is emtpy, you apply a border. And if it is not empty, then you also apply a border. What's with that? Why the IF statements if the results are the same.

    If you format everything with the same border, you don't need to loop through the range. Just apply the borders to the whole range in one step. Use the macro recorder for the required syntax.

  3. #3
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Border around all cells in a column range to last row.

    1 line :
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Border around all cells in a column range to last row.

    I only want it for a specific range of columns and row count will always be different. I have to apply it to a sheet after the sheet is created each time and each time the rows are different but the columns are the same. For ex. columns e thru m starting at row 8 until the last row of data in column B.
    Last edited by enhydra; 09-21-2017 at 12:05 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Border around all cells in a column range to last row.

    or change the codes as
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Border around all cells in a column range to last row.

    That's it, Thank you so much ikboy.

+ 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] Unable to put bottom border on a range of cells
    By maxhecht2 in forum Excel General
    Replies: 3
    Last Post: 01-04-2017, 09:47 AM
  2. [SOLVED] Border a range of cells
    By cocacrave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2015, 03:14 AM
  3. Use VBA to place a border around a range of cells based on value of another cell
    By scshockley01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2014, 10:41 PM
  4. Border for Specified RANGE of cells
    By Pho6 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2013, 04:30 PM
  5. [SOLVED] Add border to cells based on cell value within column
    By msmick in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-14-2012, 02:18 PM
  6. [SOLVED] bottom border on a range of cells using a variable for the row value
    By jlawson258 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2012, 12:45 PM
  7. Conditionally adding a border to a range of cells
    By tqcarroll88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2008, 07:41 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