EXCEL: Wie formatieren Sie einen dicken unteren Rand für eine gesamte Zeile basierend auf einem Spaltenwert?

15834
fwaokda

Mögliche Duplikate:
Bedingte Excel-Formatierung zum Hervorheben der gesamten Zeile, wenn ein Datum nicht mit einem anderen Datum in dieser Zeile übereinstimmt

Ich habe folgende Zeilen ...

1 AA 12 13 4 7 1 A 12 13 5 2 1 A 12 14 5 2 1 AAA 1 15 3 1 2 AAA 1 15 3 1 2 AA 3 44 5 19 2 A R 4 33 87 3 AA 3 3R 55 77 

Und ich möchte lernen, wie man bedingte Formatierungen ausführt, damit ich bei einer Wertänderung der linken Spalte den gesamten unteren Rand mit einem dicken unteren Rand versehen kann. So würde es zum Beispiel so aussehen ...

1 AA 12 13 4 7 1 A 12 13 5 2 1 A 12 14 5 2 1 AAA 1 15 3 1 ------------------------- 2 AAA 1 15 3 1 2 AA 3 44 5 19 2 A R 4 33 87 ------------------------- 3 AA 3 3R 55 77 

und so weiter...

Ich konnte es zum Laufen bringen, aber nur für die erste Spalte und nicht die gesamte Zeile formatieren. Vielen Dank!

1

3 Antworten auf die Frage

8
chuff

You need to anchor the column references in the formula for the conditional format.

Assuming that your data range begins in A1, you would set a conditional format on the range A1:F1 with a criterion formula $A1<>$A2 and your chosen format.

Then, you would copy the formatting of the row down the range (using Paste Special Format).

Vielen Dank! Für die Antwort noch neu zu übertreffen! Die $ waren das, was mir gefehlt hat. fwaokda vor 11 Jahren 0
Dies war eine großartige Antwort, aber ich habe vergessen, dass eine Formel in Excel immer mit "=" beginnt - und so wurde mir schließlich klar, dass ich es könnte: Wählen Sie den gesamten Block aus und fügen Sie die bedingte Formatierung hinzu. Ich musste nur sicherstellen, dass die Box Folgendes enthält: `= $ A1 <> $ A2` :) Ian Grainger vor 8 Jahren 0
2
ApplePie

Supposing your top-left cell is A1, select all the data starting at A1 and then use this formula:

=$A1<>$A2 
0
DesertSpider

Hier sind einige VBA, die das tun, wonach Sie suchen.

Sub LineSep()  ' Start Location 1 lower than first range with value Range("A2").Select  Do If ActiveCell.Offset(-1, 0).Value = ActiveCell.Value Then ActiveCell.Offset(1, 0).Select Else: Range(Selection, Selection.End(xlToRight)).Select With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlMedium End With ActiveCell.Offset(1, 0).Select End If  Loop Until ActiveCell.Value = ""  End Sub 
Weitere VBA-Codes für diese Funktion finden Sie unter https://www.mrexcel.com/forum/excel-questions/749698-automatically-adding-border-line-after-change-value-column.html#post3683193 sondra.kinsey vor 6 Jahren 0