Wer kennt sich aus?
Also es sollte ein Makro starten wenn Änderung in A1
auftritt mit Worksheet_Calculate(Worksheet_Change macht leider nicht).
Gruß
Rolf
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Call MeinMakro
Application.EnableEvents = True
End Sub
Sub MeinMakro()
MsgBox "Makro wurde gestartet"
End Sub
Gruß Tino
Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("A1").FormulaLocal > "" Then
Range("B1").FormulaLocal = Range("A1").FormulaLocal
End If
Application.EnableEvents = True
End Sub
'2. Möglichkeit
'Formel wird 1 zu 1 übertragen in B1
'und Formel in A1 gelöscht
Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("A1").FormulaLocal > "" Then
Range("B1").FormulaLocal = Range("A1").FormulaLocal
Range("A1").ClearContents
End If
Application.EnableEvents = True
End Sub
'3. Möglichkeit
'Ergebnis aus Formel wird in B1 geschrieben
'Formel in A1 bleibt erhalten
Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("A1").FormulaLocal > "" Then
Range("B1").Value = Range("A1").Value
End If
Application.EnableEvents = True
End Sub
'4. Möglichkeit
'Ergebnis aus Formel wird in B1 geschrieben
'und Formel in A1 gelöscht
Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("A1").FormulaLocal > "" Then
Range("B1").Value = Range("A1").Value
Range("A1").ClearContents
End If
Application.EnableEvents = True
End Sub
Gruß Tino
Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("A1").FormulaLocal > "" Then
Range("A2").Value = Range("A1").Value
End If
Application.EnableEvents = True
End Sub
"Es kommt noch eine Zirkelmeldung"
Diese Meldung kommt wegen Deiner Formel, dass kann ich auch nicht beheben!
Formel in A1 und Du möchtest
=Summe(A1;B1)
Gruß Tino
Option Explicit
Private Sub Worksheet_Calculate()
Static oldTarget As String
If oldTarget = "" Then oldTarget = Range("A1")
If Range("A1") oldTarget Then
MsgBox "Verändert"
oldTarget = Range("A1")
End If
End Sub