HERBERS Excel-Forum - die Beispiele

Thema: Zeitabhängige Zellmarkierungen über bedingte Formatierung setzen

Home

Gruppe

Feature

Problem

A1 soll von 22:01-06:00, B1 von 06:01 bis 14:00 und C1 von 14:01 bis 22:00 Uhr einen Rahmen erhalten.

Lösung
Nur anhand einer Beipspielarbeitsmappe darstellbar.
StandardModule: Modul1

Sub Auswahl()
   Dim rng As Range, rngLast As Range
   Dim lRow As Long
   Dim sBegriff As String, sAddress As String
   sBegriff = InputBox( _
      prompt:="Bitte Suchbegriff eingeben:", _
      Default:="Hallo")
   If sBegriff = "" Then Exit Sub
   Set rng = Cells.Find( _
      what:=sBegriff, _
      lookat:=xlWhole, _
      LookIn:=xlValues, _
      MatchCase:=False, _
      after:=ActiveCell)
   If rng Is Nothing Then
      Beep
      MsgBox "Suchbegriff nicht gefunden!", , _
         Application.UserName
      Exit Sub
   End If
   sAddress = rng.Address
   rng.Select
   rng.Offset(1).Select
   Do
      Set rngLast = ActiveCell
      Cells.FindNext(after:=ActiveCell).Activate
      If ActiveCell.Address = sAddress Then Exit Do
   Loop
   lRow = Range("A1").CurrentRegion.Rows.Count + 1
   Rows(lRow).Value = rngLast.EntireRow.Value
End Sub

Beiträge aus dem Excel-Forum zu den Themen Feature und Bedingt

Bedingte Formatierung vor Copy/Paste schützen Bedingte Formatierung per VBA mit Schleife
bedingte Formatierung Bedingte Formatierung
Teilstringabfrage bei bedingter Formatierung Bedingte Formatierung mit UND Verknüpfung
Bedingte Formatierung Frage bedingte Formatierung mit mehreren Bedingungen
Bedingte Formattierung Bedingte Formatierung - kleiner als Fehler
bedingte formatierung per VBA Bedingte Formatierung bezogen auf 2. Zelle
bedingte Formatierung Bedingte Formatierung
wenn z.B. Zahl 12 dann grün (Bedingte Formatierung wenn z.B. Zahl 12 dann grün (Bedingte Formatierung
bedingte Formatierung für zellenbereich Bedingte Formatierung mit 2 Bedingungen
Bedingte Formatierung bedingte Formatierung bei 15 Kriterien
Bedingtes Nummernformat. Bedingte Formatierung
Bedingte Format. oder VBA? Bedingte Formatierung für gesamte Zeile?
Bedingte Formatierung-VBA? Bedingte Formatierung?!
bedingte formatierung per Makro Bedingte Formatierung
bedingte Formatierung sowie mit Datumsfeld Bedingte Formatierung - Zeilen gruppieren
Bedingte Formate Bedingte Formatierung mit Formel
Bedingte Codeausführung per Attribut bedingte Formatierung
Bedingte Formatierung anhalten Bedingte Formatierung - Dringend
Bedingte Formatierung Nach bestimmter bedingter Formatierung suchen
Bedingte Formatierung Automatisch schliessen ohne Speichern, bedingt
Bedingte Formateierung Bedingte Formatierungen - Datenbalken
Kompatibilität -Bedingte Formatierung NUR bedingte Formate übertragen
mehr als 3 bedingte formatierungen Bedingte Formatierung - gantt Diagramm
Bedingte Formatierung in Pivot_NICHT in SubTotals? Dreifach Bedingte Formatierung über VBA in Pivot
bedingte Formatierung und Formeln