Hi,
I've been looking for a VBA code to format borders with conditions.
I searched on the internet but I only found results for conditional formatting.
I know I can use conditional formatting, but I don't want to because conditional formatting tends to mess up when we move or delete rows, so I'm only looking for a VBA code.
Here is what I am looking for:
Each time the content of the cell in column B changes, the bottom of the entire line should be like that (I think):
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDash
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
And then, when the content of the cell in column A changes, the bottom of the entire line should be line that:
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
Do you know how to that?
Thanks!
I've been looking for a VBA code to format borders with conditions.
I searched on the internet but I only found results for conditional formatting.
I know I can use conditional formatting, but I don't want to because conditional formatting tends to mess up when we move or delete rows, so I'm only looking for a VBA code.
![815790Capture.png](/board/proxy.php?image=https%3A%2F%2Fimg15.hostingpics.net%2Fpics%2F815790Capture.png&hash=87225f7b2f50d7208f7d9c50c4f18f4a)
Here is what I am looking for:
Each time the content of the cell in column B changes, the bottom of the entire line should be like that (I think):
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDash
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
And then, when the content of the cell in column A changes, the bottom of the entire line should be line that:
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
Do you know how to that?
Thanks!