Thema Datum  Von Nutzer Rating
Antwort
17.10.2011 08:58:14 Berni
NotSolved
17.10.2011 16:18:24 Till
NotSolved
18.10.2011 08:54:01 Berni
NotSolved
18.10.2011 12:52:51 MV
NotSolved
18.10.2011 13:44:47 Gast7135
NotSolved
18.10.2011 13:51:36 MV
NotSolved
19.10.2011 08:45:35 Berni
NotSolved
18.10.2011 20:24:23 Till
NotSolved
19.10.2011 09:43:50 Till
NotSolved
20.10.2011 12:35:01 Berni
NotSolved
20.10.2011 19:24:52 Till
NotSolved
24.10.2011 08:35:56 Berni
NotSolved
24.10.2011 08:45:06 Berni
NotSolved
31.10.2011 21:53:57 Till
Solved
24.10.2011 09:29:38 Till
NotSolved
24.10.2011 09:35:05 Till
NotSolved
24.10.2011 09:51:43 berni
NotSolved
24.10.2011 12:55:29 Dekor
NotSolved
24.10.2011 13:25:26 Berni
NotSolved
24.10.2011 20:22:11 Till
NotSolved
25.10.2011 08:26:13 Berni
NotSolved
26.10.2011 10:13:43 Berni
NotSolved
26.10.2011 11:44:08 Till
NotSolved
31.10.2011 12:01:15 Berni
NotSolved
Rot Ergänzung zu Hilfe bei If- bzw. Case-Anwendung
02.11.2011 23:50:41 Till
NotSolved
02.11.2011 23:52:22 Till
Solved

Ansicht des Beitrags:
Von:
Till
Datum:
02.11.2011 23:50:41
Views:
2197
Rating: Antwort:
  Ja
Thema:
Ergänzung zu Hilfe bei If- bzw. Case-Anwendung

Hab jetzt aber keine Ahnung was in welche Spalte muss, musst du anpassen...

?
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
Option Explicit
 
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
 
    With Target
        OnChange1 Target, .Row, .Column, .Value
        OnChange2 Target, .Row, .Column, .Value
    End With
    
Application.EnableEvents = True
End Sub
 
Private Function OnChange1(Target As Range, R&, C&, V)
Dim NichtLeer As Boolean, Wert#
On Error Resume Next
 
    Select Case R
    Case Is > 33, Is < 4
        Exit Function
    End Select
        
    Select Case C
    Case Is > 7, Is < 4
        Exit Function
    Case 4: If V = "x" Then Wert = 3
    Case Else: If V = "x" Then Wert = 1
    End Select
    If V <> "" Then
        Range(Cells(R, 4), Cells(R, 7)).ClearContents
        Target.Value = "x"
    End If
       
    If Wert <> 0 Then
        Cells(6 + R, 3) = Wert
    Else
        If Cells(R, 8).End(xlToLeft).Column < 4 Then
            Cells(6 + R, 3) = ""
        End If
    End If
    
End Function
 
Private Function OnChange2(Target As Range, R&, C&, V)
Dim rng As Range, sumCell As Range
On Error Resume Next
 
    Set sumCell = Cells(R, 11)
    If R > 33 Or V = "" Then
        sumCell = ""
        Exit Function
    End If
 
    Select Case C
    Case Is > 8, Is < 4: Exit Function
    End Select
 
    Set rng = Range(Cells(R, 4), Cells(R, 8))
    rng.ClearContents
    Target.Value = "x"
    sumCell = (8 - C) * Cells(R, 3) 'Summe
 
End Function

 


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
17.10.2011 08:58:14 Berni
NotSolved
17.10.2011 16:18:24 Till
NotSolved
18.10.2011 08:54:01 Berni
NotSolved
18.10.2011 12:52:51 MV
NotSolved
18.10.2011 13:44:47 Gast7135
NotSolved
18.10.2011 13:51:36 MV
NotSolved
19.10.2011 08:45:35 Berni
NotSolved
18.10.2011 20:24:23 Till
NotSolved
19.10.2011 09:43:50 Till
NotSolved
20.10.2011 12:35:01 Berni
NotSolved
20.10.2011 19:24:52 Till
NotSolved
24.10.2011 08:35:56 Berni
NotSolved
24.10.2011 08:45:06 Berni
NotSolved
31.10.2011 21:53:57 Till
Solved
24.10.2011 09:29:38 Till
NotSolved
24.10.2011 09:35:05 Till
NotSolved
24.10.2011 09:51:43 berni
NotSolved
24.10.2011 12:55:29 Dekor
NotSolved
24.10.2011 13:25:26 Berni
NotSolved
24.10.2011 20:22:11 Till
NotSolved
25.10.2011 08:26:13 Berni
NotSolved
26.10.2011 10:13:43 Berni
NotSolved
26.10.2011 11:44:08 Till
NotSolved
31.10.2011 12:01:15 Berni
NotSolved
Rot Ergänzung zu Hilfe bei If- bzw. Case-Anwendung
02.11.2011 23:50:41 Till
NotSolved
02.11.2011 23:52:22 Till
Solved