wenn ich eine Zelle von Textformat auf Standartformat ändere, wird die darin befindliche Formel nicht berechnet.
Hat jemand eine Idee, wie ich dies per makro realisieren kann?
Siehe Beispieldatei.
https://www.herber.de/bbs/user/66685.xls
M.f.G.
Lutz
Sub v()
Dim x
x = Range("D8").Value
Range("D8").NumberFormat = "general"
Range("D8").Formula = x
End Sub
Gruß GerdPublic Function Zellformat()
Set mark = ActiveCell
'Zellen Textformat
If Worksheets("Tabelle1").OptionButton1 = True Then
intz1 = 1
Worksheets("Tabelle1").Cells(7, 3) = "alle Zellen Textformat"
End If
'Zellen Standard
If Worksheets("Tabelle1").OptionButton2 = True Then
intz1 = 2
Worksheets("Tabelle1").Cells(7, 3) = "alle Zellen Standardformat"
End If
If intz1 = 1 Then
With Range("A1:IV65536")
.NumberFormat = "@"
End With
strg1 = Worksheets("Tabelle1").Range("C14").Formula
Worksheets("Tabelle1").Range("C14").Formula = strg1
Else
With Range("A1:IV65536")
.NumberFormat = "General"
End With
strg1 = Worksheets("Tabelle1").Range("C14").Formula
Worksheets("Tabelle1").Range("C14").Formula = strg1
End If
mark.Activate
End Function
M.f.G.