+ Reply to Thread
Results 1 to 7 of 7

Add thick Border around range after deleting empty rows - MACRO

  1. #1
    Registered User
    Join Date
    02-12-2018
    Location
    Melbourne
    MS-Off Ver
    2016
    Posts
    15

    Question Add thick Border around range after deleting empty rows - MACRO

    Hello,

    I have created a macro that checks a range of data and removes an empty row. It's working perfectly. I am trying to write some code now to place a thick border around the entire new range after the blank rows are deleted.

    Please Login or Register  to view this content.

    Is someone able to provide me with an example of how to approach this next step? I thought it might be easier before the removed row, to have a bit of code which finds the last row in the range first, then add the line.

  2. #2
    Forum Contributor
    Join Date
    09-19-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    208

    Re: Add thick Border around range after deleting empty rows - MACRO

    How about this:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    18,769

    Re: Add thick Border around range after deleting empty rows - MACRO

    Try
    Please Login or Register  to view this content.
    The data range which needs to be boxed is ("C18:Z30") minus the deleted rows.
    Last edited by jindon; 10-09-2018 at 11:55 PM.

  4. #4
    Registered User
    Join Date
    02-12-2018
    Location
    Melbourne
    MS-Off Ver
    2016
    Posts
    15

    Re: Add thick Border around range after deleting empty rows - MACRO

    Hi,

    Thanks for the reply. I think i have not provided enough info in the intial post therefore the solution posted works but not what i after.

    The data range which needs to be boxed is ("C18:Z30") minus the deleted rows. For Example, if the range ("C18:Z30") has 2 rows deleted, the box should go around ("C18:Z28")

    Apologies, I hope that make sense?

    kind regards

    dv

  5. #5
    Registered User
    Join Date
    02-12-2018
    Location
    Melbourne
    MS-Off Ver
    2016
    Posts
    15

    Re: Add thick Border around range after deleting empty rows - MACRO

    Hi jindon

    That has worked well, Thank you. The only issue now it is putting a border around every cell. I only require a thick border around the entire range, not the actual cells.

    Is there a way to achieve that in a similar way you have shown?

  6. #6
    Forum Contributor
    Join Date
    09-19-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    208

    Re: Add thick Border around range after deleting empty rows - MACRO

    Try:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-12-2018
    Location
    Melbourne
    MS-Off Ver
    2016
    Posts
    15

    Re: Add thick Border around range after deleting empty rows - MACRO

    Thanks all

    below was the final code that worked.

    Please Login or Register  to view this content.

+ 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. Thick Bottom Border for Dynamic Print Range
    By Robecca in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-21-2014, 12:04 PM
  2. [SOLVED] Macro to set extra extra thick outer border for selected column and row:
    By Chad Bateman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2014, 01:43 PM
  3. Need help deleting empty rows from a range from the bottom of the list up
    By pasqualebaldi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2014, 07:48 PM
  4. Loop that adds thick bottom border to row range
    By msmick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2012, 11:43 PM
  5. Need macro to add thick box border to certain cells - THANKS FOR THE HELP!!!
    By Jeff M in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2011, 09:57 AM
  6. Replies: 2
    Last Post: 06-15-2007, 04:16 PM
  7. Macro to Conditionally format Thick Border
    By nuver in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-06-2005, 08:05 PM

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