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
Blau Hilfe bei If- bzw. Case-Anwendung
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
02.11.2011 23:50:41 Till
NotSolved
02.11.2011 23:52:22 Till
Solved

Ansicht des Beitrags:
Von:
Till
Datum:
24.10.2011 20:22:11
Views:
1287
Rating: Antwort:
  Ja
Thema:
Hilfe bei If- bzw. Case-Anwendung

Sollte beide Funktionen beinhalten:

Option Explicit
 
Private Sub Worksheet_Change(ByVal Target As Range)
Dim C&, NichtLeer As Boolean, R&, Wert#, V
Application.EnableEvents = False
On Error GoTo ExitSub
    With Target
        R = .Row
        C = .Column
        V = .Value
    End With
     
    Select Case R
    Case Is > 14, Is < 5
        Application.EnableEvents = True
        Exit Sub
    End Select
     
    Select Case C
    Case Is > 7, Is < 4
        Application.EnableEvents = True
        Exit Sub
    Case 4: If V = "x" Then Wert = 3
    Case Else: If V = "x" Then Wert = 1
    End Select
    If V <> "" Then 'neu
        Range(Cells(R, 4), Cells(R, 7)).ClearContents 'neu
        Target = "x" 'neu
    End If
    
    If Wert <> 0 Then
        Cells(11 + R, 3) = Wert
    Else
        If Cells(R, 8).End(xlToLeft).Column < 4 Then
            Cells(11 + R, 3) = ""
        End If
    End If
 
ExitSub:
Application.EnableEvents = True
End Sub

Es is nicht wirklich schwer das in VBA zu machen, wenn man weiß was man bzw. jemand anders will, der Sinn vom Excel-Formeln ist natürlich sowas möglichst einfach für Jeden umsetzbar zu machen und da sind sie auch ziehmlich effektiv... haben aber ihre Grenzen...


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
Blau Hilfe bei If- bzw. Case-Anwendung
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
02.11.2011 23:50:41 Till
NotSolved
02.11.2011 23:52:22 Till
Solved