The following macro allows me to set a dynamic boarder range around the cells that have data in them. A modification to the macro that I need help with is code that would allow me to maintain the dynamic capability, but with thick black color boarders that run around the following areas, instead of the thin black color borders:
• Along the top edge of cells G11:J11, and
• Along the left edge of cells in columns G and J, and
• Along the right edge of cells in cloumn J
Sub DynamicRangeBorders_2()
Dim StartCell As Range
Set StartCell = Range("A11")
Cells.Borders.LineStyle = xlNone
StartCell.CurrentRegion.Borders.LineStyle = xlContinuous
End Sub
Here is an image of the data and range with the thin line black boarders applied by the above macro.
Thanks, John
Excel 2013/2016
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]11[/TD]
[TD="align: center"]Client[/TD]
[TD="align: center"]Location/
Network(s)[/TD]
[TD="align: center"]Campaign Name[/TD]
[TD="align: center"]No. Of
Posn[/TD]
[TD="align: center"]No. Of
Spots[/TD]
[TD="align: center"]Spot Name[/TD]
[TD="align: center"]Video
Ad Time
Length[/TD]
[TD="align: center"]Airtime
Start Date[/TD]
[TD="align: center"]Airtime
End Date[/TD]
[TD="align: center"]Campaign
End Date[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]EVM[/TD]
[TD="align: center"]2017-2018 Season[/TD]
[TD="align: center"]0.5[/TD]
[TD="align: center"]26 of 29[/TD]
[TD="align: center"]House Over [/TD]
[TD="align: center"]15.0[/TD]
[TD="align: center"]03/26/18[/TD]
[TD="align: center"]04/02/18[/TD]
[TD="align: center"]06/30/18[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]EVM[/TD]
[TD="align: center"]2017-2018 Season[/TD]
[TD="align: center"]0.5[/TD]
[TD="align: center"]26 of 29[/TD]
[TD="align: center"]House Over[/TD]
[TD="align: center"]15.0[/TD]
[TD="align: center"]03/26/18[/TD]
[TD="align: center"]04/02/18[/TD]
[TD="align: center"]06/30/18[/TD]
</tbody>
• Along the top edge of cells G11:J11, and
• Along the left edge of cells in columns G and J, and
• Along the right edge of cells in cloumn J
Sub DynamicRangeBorders_2()
Dim StartCell As Range
Set StartCell = Range("A11")
Cells.Borders.LineStyle = xlNone
StartCell.CurrentRegion.Borders.LineStyle = xlContinuous
End Sub
Here is an image of the data and range with the thin line black boarders applied by the above macro.
Thanks, John
Excel 2013/2016
A | B | C | D | E | F | G | H | I | J | |
---|---|---|---|---|---|---|---|---|---|---|
Geva | ||||||||||
Geva |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]11[/TD]
[TD="align: center"]Client[/TD]
[TD="align: center"]Location/
Network(s)[/TD]
[TD="align: center"]Campaign Name[/TD]
[TD="align: center"]No. Of
Posn[/TD]
[TD="align: center"]No. Of
Spots[/TD]
[TD="align: center"]Spot Name[/TD]
[TD="align: center"]Video
Ad Time
Length[/TD]
[TD="align: center"]Airtime
Start Date[/TD]
[TD="align: center"]Airtime
End Date[/TD]
[TD="align: center"]Campaign
End Date[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]EVM[/TD]
[TD="align: center"]2017-2018 Season[/TD]
[TD="align: center"]0.5[/TD]
[TD="align: center"]26 of 29[/TD]
[TD="align: center"]House Over [/TD]
[TD="align: center"]15.0[/TD]
[TD="align: center"]03/26/18[/TD]
[TD="align: center"]04/02/18[/TD]
[TD="align: center"]06/30/18[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]EVM[/TD]
[TD="align: center"]2017-2018 Season[/TD]
[TD="align: center"]0.5[/TD]
[TD="align: center"]26 of 29[/TD]
[TD="align: center"]House Over[/TD]
[TD="align: center"]15.0[/TD]
[TD="align: center"]03/26/18[/TD]
[TD="align: center"]04/02/18[/TD]
[TD="align: center"]06/30/18[/TD]
</tbody>
EVM - Finished Report