Thema Datum  Von Nutzer Rating
Antwort
09.01.2023 11:06:08 Kim
NotSolved
Blau Bedingte Formatierung in Range
09.01.2023 16:23:58 UweD
***
NotSolved

Ansicht des Beitrags:
Von:
UweD
Datum:
09.01.2023 16:23:58
Views:
640
Rating: Antwort:
  Ja
Thema:
Bedingte Formatierung in Range

Hallo

versuch es mal so

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Sub Formatierung()
 
    Dim Zelleeins As Variant
    Zelleeins = "A2"
 
    Dim Zellezwei As Variant
    Zellezwei = "A3"
     
    Dim RNG As Range
     
    Zelleeins = InputBox(" Zelle 1 die formatiert werden soll ", , Zelleeins)
    Debug.Print [Zelleeins]
 
    Zellezwei = InputBox(" Zelle 2 die formatiert werden soll ", , Zellezwei)
    Debug.Print [Zellezwei]
 
    Set RNG = Tabelle1.Range(Range(Zelleeins), Range(Zellezwei))
    With RNG
        With .Interior
            .Pattern = xlSolid
            .PatternColorIndex = xlAutomatic
            .Color = 65735
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
    
        .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
            Formula1:="=""C"""
        .FormatConditions(.FormatConditions.Count).SetFirstPriority
        With .FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 12713983
        End With
 
 
        .FormatConditions(1).StopIfTrue = False
        .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
            Formula1:="=""C1"""
        .FormatConditions(.FormatConditions.Count).SetFirstPriority
        With .FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 65535
        End With
 
 
        .FormatConditions(1).StopIfTrue = False
        .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
            Formula1:="=""B"""
        .FormatConditions(.FormatConditions.Count).SetFirstPriority
        With .FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 255
        End With
 
 
        .FormatConditions(1).StopIfTrue = False
        .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
            Formula1:="=""B1"""
        .FormatConditions(.FormatConditions.Count).SetFirstPriority
        With .FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 192
        End With
 
 
        .FormatConditions(1).StopIfTrue = False
        .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
            Formula1:="=""A"""
        .FormatConditions(.FormatConditions.Count).SetFirstPriority
        With .FormatConditions(1).Font
            .Bold = True
        End With
     
        With .FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 192
        End With
 
    End With
 
End Sub

LG UweD


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
09.01.2023 11:06:08 Kim
NotSolved
Blau Bedingte Formatierung in Range
09.01.2023 16:23:58 UweD
***
NotSolved