Unterstreichen
18.11.2003 16:20:17
Stefan
ich bins nochmal, ich habe es tatsächlich geschaft, das nach einer wertänderung Ab spalte j29 ein strich eingefügt wird! das dauert allerdings enorm lang, weil ich nur weiß wie jede zelle einzelln markeirt werden kann! wie kann ich das denn schneller machen?
Danke für eure hilfe
Sub ZeilenUnterstreichen()
BAnf = 29
SpaA = 10
VG1 = Cells(BAnf, SpaA).Value
VG2 = Cells(BAnf + 1, SpaA).Value
Do While VG2 <> ""
If VG1 <> VG2 Then
Cells(BAnf + 1, SpaA).Select
BAnf = BAnf + 1
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNoneEnd
End If
BAnf = BAnf + 1
VG1 = Cells(BAnf, SpaA).Value
VG2 = Cells(BAnf + 1, SpaA).Value
Loop
End Sub