Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Excel - bedingte Formatierung oder VBA?

Empfohlene Antworten

Veröffentlicht

Moin,

ich hab folgendes Problem:

Ich habe eine dreispaltige Tabelle, in welcher bestimmte Zellen in Abhängigkeit des Wertes der mittleren Spalte eingefärbt werden sollen.

Beispiel:

A1 B1 C1

1 xy abc

2 zx xyz

3 xy 123

Wenn nun in der Spalte B eine Zelle den Wert "xy" hat, sollen die Zellen A,B und C dieser Reihe mit einer Hintergrundfarbe belegt werden.

Ich habe es mit bedingter Formatierung probiert, was allerdings schief ging. Meine VBA-Kenntnisse hingegen sind so eingerostet, dass mir auch hier die zündende Idee fehlt.

Hat jemand einen Vorschlag oder einen Codeschnipsel, der mir weiterhelfen könnte?

Moin Wolve,

falls es noch aktuell ist, mit VBA könnt man das so machen:

int_Zeile = 1

Do

    If Cells(int_Zeile, 2) = "xy" Then _

        Range("A" & int_Zeile, "C" & int_Zeile).Interior.ColorIndex = 3

    int_Zeile = int_Zeile + 1

Loop Until Cells(int_Zeile, 2) = ""

Geht alle Zeilen durch bis er eine leere Zelle in der B-Spalte findet und färbt die Zeilen mit 'xy' ein (rot in dem Beispiel).

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.