Range / End(xlUp)
06.10.2003 13:58:56
Rafael
ich möchte den Code meines Macros verkürzen. U.a. sollen die Inhalte zusammenhängender, aber in der Adresse wechselnder Zellen fett markiert werden.
Leider funktioniert der folgende Ausdruck nicht:
Tabelle1.Range((Cells(Rows.Count, 2).End(xlUp)), _
(Cells(Rows.Count, 7).End(xlUp))).Font.Bold = True
Statt dessen muss ich mit dem folgenden, jedoch längeren Ausdruck arbeiten:
Tabelle1.Cells(Rows.Count, 2).End(xlUp).Font.Bold = True
Tabelle1.Cells(Rows.Count, 3).End(xlUp).Font.Bold = True
Tabelle1.Cells(Rows.Count, 4).End(xlUp).Font.Bold = True
Tabelle1.Cells(Rows.Count, 5).End(xlUp).Font.Bold = True
Tabelle1.Cells(Rows.Count, 6).End(xlUp).Font.Bold = True
Tabelle1.Cells(Rows.Count, 7).End(xlUp).Font.Bold = True
Vielleicht hat jemand von Euch einen Vorschlag zur Verkürzung? Die SpecialCells-Methode "End(xlUp)" sollte jedoch Anwendung finden.
Vielen Dank im voraus!
Rafael