HERBERS Excel-Forum - die Beispiele

Thema: Negative Zahlen ausblenden

Home

Gruppe

Feature

Problem

Negative Zahlen in Spalte A sollen ausgeblendet werden.

Lösung
Folgende Formel in der Bedingten Formatierung: =A1<0
StandardModule: Modul1

Sub GetValues()
   Dim iWks As Integer, iRow As Integer, iRowT As Integer
   Dim sName As String, sSName As String
   sName = Range("F1").Value
   sSName = Range("F2").Value
   For iWks = ActiveSheet.Index + 1 To Worksheets.Count
      iRow = 1
      With Worksheets(iWks)
         Do Until IsEmpty(.Cells(iRow, 1))
            If .Cells(iRow, 1).Value = sName And .Cells(iRow, 2).Value = sSName Then
               iRowT = iRowT + 1
               Cells(iRowT, 1).Value = .Cells(iRow, 3).Value
               Cells(iRowT, 2).Value = .Name
               Cells(iRowT, 3).Value = .Cells(iRow, 1).Address(False, False)
            End If
            iRow = iRow + 1
         Loop
      End With
   Next iWks
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