Applying Bottom and right border

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Please assist.
How do I put a bottom and right border on each cell in a range?
This is what I have for the bottom border.

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeBottom).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeLeft).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeRight).LineStyle = xlContinuous


Thanks
 
Something like this...

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

With rng
.Borders.LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top