Private Sub cmbUebernehmen_Click()
Dim strFormel As String
Dim coElement As Control
If Selection.Count > 1 Then
MsgBox "Bitte nur 1 Zelle auswählen"
Else
If ActiveCell.HasFormula Then
strFormel = ActiveCell.FormulaLocal
If opbLoeschen Then
If InStr(ActiveCell.FormulaLocal, "AUFRUNDEN(") > 0 Then
strFormel = Mid(strFormel, 12)
strFormel = Mid(strFormel, 1, InStrRev(strFormel, ";") - 1)
ActiveCell.FormulaLocal = "=" & strFormel
ElseIf InStr(ActiveCell.FormulaLocal, "ABRUNDEN(") > 0 Then
strFormel = Mid(strFormel, 11)
strFormel = Mid(strFormel, 1, InStrRev(strFormel, ";") - 1)
ActiveCell.FormulaLocal = "=" & strFormel
ElseIf InStr(ActiveCell.FormulaLocal, "RUNDEN(") > 0 Then
strFormel = Mid(strFormel, 9)
strFormel = Mid(strFormel, 1, InStrRev(strFormel, ";") - 1)
ActiveCell.FormulaLocal = "=" & strFormel
End If
Else
If IsNumeric(tbFaktor) Then
If InStr(ActiveCell.FormulaLocal, "AUFRUNDEN(") > 0 Then
strFormel = Mid(strFormel, 12)
strFormel = Mid(strFormel, 1, InStrRev(strFormel, ";") - 1)
ActiveCell.FormulaLocal = "=" & strFormel
ElseIf InStr(ActiveCell.FormulaLocal, "ABRUNDEN(") > 0 Then
strFormel = Mid(strFormel, 11)
strFormel = Mid(strFormel, 1, InStrRev(strFormel, ";") - 1)
ActiveCell.FormulaLocal = "=" & strFormel
ElseIf InStr(ActiveCell.FormulaLocal, "RUNDEN(") > 0 Then
strFormel = Mid(strFormel, 9)
strFormel = Mid(strFormel, 1, InStrRev(strFormel, ";") - 1)
ActiveCell.FormulaLocal = "=" & strFormel
End If
If opbAufrunden Then
ActiveCell.FormulaLocal = "=AUFRUNDEN(" & Application.Substitute(ActiveCell.FormulaLocal, "=", "") & ";" & CInt(tbFaktor) & ")"
ElseIf opbAbrunden Then
ActiveCell.FormulaLocal = "=ABRUNDEN(" & Application.Substitute(ActiveCell.FormulaLocal, "=", "") & ";" & CInt(tbFaktor) & ")"
Else
ActiveCell.FormulaLocal = "=RUNDEN(" & Application.Substitute(ActiveCell.FormulaLocal, "=", "") & ";" & CInt(tbFaktor) & ")"
End If
Else
MsgBox "Bitte eine Zahl eingeben"
End If
End If
End If
End If
End SubSub Starten()
If ActiveCell.HasFormula Then
frmRunden.Show
Else
MsgBox "Diese Zelle enthält keine Formel"
End If
End Sub
Excel - Sortierung leere Zellen an den Anfang stellen
andreas_3 09.10.2008 - 29 Hits - 3 Antworten
Excel Makro das Schriftfarbe nach Abfrage ändert ?
Wuschl32 28.10.2008 - 27 Hits - 8 Antworten
bestehendes Makro erweitern ... Abfrage ob Tabelle bereits vorhanden ist
Petra65 08.09.2009 - 283 Hits - 5 Antworten
Abfrage über Excel
Mellli 07.09.2009 - 128 Hits - 3 Antworten
Kann man in Excel auch kaufmännisch auf 5-er runden (5, 15, 25)
maaxcologne 29.09.2009 - 365 Hits - 3 Antworten