Hi, I lost my mind in this UDF. I can't change the numberformat of a cell calling the formula Frazione.
[VBA]Function Frazione(Numer As Integer, Denom As Integer)
Application.Volatile (True)
Dim RgCaller As Range
Set RgCaller = Application.Caller
Frazione = (Numer / Denom)
RgCaller.NumberFormat = "# ?/" & Denom
End Function[/VBA]
The fact is that it doesn't work with any NumberFormat.
Can't you change a cell while it is calculating?