Thema Datum  Von Nutzer Rating
Antwort
10.05.2009 20:31:16 werner
NotSolved
11.05.2009 08:47:44 Holger
NotSolved
11.05.2009 20:27:12 Werner
NotSolved
06.08.2013 10:54:56 stephane
NotSolved
01.04.2014 07:23:12 frank
NotSolved
20.04.2014 16:45:25 mac
NotSolved
23.04.2014 12:31:33 mac
NotSolved
24.10.2014 17:46:26 Andy
NotSolved
03.11.2014 03:44:02 Christian
NotSolved
14.01.2015 09:18:42 herztreu
NotSolved
06.05.2015 11:11:11 P_J_M
NotSolved
05.05.2014 10:16:18 Alexxx
NotSolved
28.10.2014 13:57:08 Gast80121
NotSolved
07.11.2014 10:21:20 Christian
NotSolved
Rot Excel VBA
19.01.2015 19:46:43 Lillyfee
NotSolved

Ansicht des Beitrags:
Von:
Lillyfee
Datum:
19.01.2015 19:46:43
Views:
1470
Rating: Antwort:
  Ja
Thema:
Excel VBA
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal TARGET As Excel.Range)
        
Dim ws As Worksheet
Dim Blattname As String

For i = 7 To 39
If TARGET.Address = "$I$" & i And IsEmpty(TARGET) = True Then
    Range("I" & i).Select
    ActiveCell.FormulaR1C1 = "=(HOUR(RC[-3])*60+MINUTE(RC[-3]))/60"
    Selection.Font.Bold = False  'Normalschrift

ElseIf TARGET.Address = "$I$" & i And IsEmpty(TARGET) = False Then
    Selection.Font.Bold = True  'Fettschrift
End If
Next i

For j = 7 To 39
If TARGET.Address = "$J$" & j And IsEmpty(TARGET) = True Then
    Range("J" & j).Select
    ActiveCell.FormulaR1C1 = "=(HOUR(RC[-3])*60+MINUTE(RC[-3]))/60/4"
    Selection.Font.Bold = False  'Normalschrift

ElseIf TARGET.Address = "$J$" & j And IsEmpty(TARGET) = False Then
    Selection.Font.Bold = True  'Fettschrift
End If
Next j

    For t = 7 To 39

    Blattname = ActiveSheet.Name
            If TARGET.Address = "$T$" & t And IsEmpty(TARGET) = True Then
                Range("T" & t).Select
                ActiveCell.FormulaR1C1 = "=IF(RC[-9]>0,0.0001,(RC[-5]-RC[-6])*24)"
                
              For Each ws In Sheets(Array(Blattname))
                  ws.Unprotect Password:="peterpan"
                  ws.Range("T7:T39").Locked = False
                Selection.Font.Bold = False  'Normalschrift
                  ws.Range("T7:T39").Locked = True
                  ws.Protect Password:="peterpan"
              Next

            ElseIf TARGET.Address = "$T$" & t And IsEmpty(TARGET) = False Then
                
              For Each ws In Sheets(Array(Blattname))
                  ws.Unprotect Password:="peterpan"
                  ws.Range("T7:T39").Locked = False
                Selection.Font.Bold = True  'Fettschrift
                  ws.Range("T7:T39").Locked = True
                  ws.Protect Password:="peterpan"
              Next
            
            End If
    Next t

End Sub

Hallo liebe Experten,

ich brauche Hilfe. Die o. g. Programmierung muss angepasst werden und ich habe so gar keine Ahnung davon. Statt in der T-Spalte soll die neue Formel in die U-Spalte. Der Rest soll unverändert bleiben.

 

Neue Formel                 =WENN(K7>0;0,0001;(T7))

 

Wenn Ihr mir helfen könntet, wäre das wundervoll.

 

Liebe Grüße

Lillyfee


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
10.05.2009 20:31:16 werner
NotSolved
11.05.2009 08:47:44 Holger
NotSolved
11.05.2009 20:27:12 Werner
NotSolved
06.08.2013 10:54:56 stephane
NotSolved
01.04.2014 07:23:12 frank
NotSolved
20.04.2014 16:45:25 mac
NotSolved
23.04.2014 12:31:33 mac
NotSolved
24.10.2014 17:46:26 Andy
NotSolved
03.11.2014 03:44:02 Christian
NotSolved
14.01.2015 09:18:42 herztreu
NotSolved
06.05.2015 11:11:11 P_J_M
NotSolved
05.05.2014 10:16:18 Alexxx
NotSolved
28.10.2014 13:57:08 Gast80121
NotSolved
07.11.2014 10:21:20 Christian
NotSolved
Rot Excel VBA
19.01.2015 19:46:43 Lillyfee
NotSolved