Formatting a Dynamic Bottom Row

mykulpasskwa

New Member
Joined
Mar 20, 2018
Messages
30
I have a range B5:R8, and there is command button that inserts a row where at the active cell. I've figured out how to preserve the formatting for the top row B5:R5 but I can't figure out how to format the bottom properly. Currently if you select the last row (R8) and Insert Row, a thick outline of the bottom most border makes its way inside the range.

I tried to do a dynamic defined name, but even if the cells are empty I want the formatting contained in that range to maintain the borders they are supposed to have.

So ultimately, if the range is B5:R8 then all the cells inside should be thin borders, and the edges should be medium borders.
Then if a user inserts a row anywhere the range become B5:R9
If that inserted row happens to be at the bottom, then the previously bottom row should change to a bottom border.
Now that I typed it out that way, I'm wondering if this is some sort of If statement? Any thoughts?


 

mykulpasskwa

New Member
Joined
Mar 20, 2018
Messages
30
Thanks for the reply. I have tried changing it over to a table and I've created a custom format for the table, however is it possible to format a particular column. As you'll see in the picture columns J and R are orange, so I would like to keep them visually distinct and as one table. That doesn't seem possible with the custom table format option, but then again this is the first time I've attempted it.
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,272
I mentioned doing things this way:
1.Select your current formatted range
2. Select insert Table
3. Now if your last row in the range is row 6 and you enter a new value in row 7 the formatting will now extend down to row 7

No need to insert row and no need for custom formatted Table

But you never mentioned if you even tried this.
 

Forum statistics

Threads
1,081,617
Messages
5,360,044
Members
400,565
Latest member
Tommy O

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top