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.
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!