I wrote a function in excel vba. return value of the function is date, but function just return value of date in cell
how can I change format of cell to date (short date is preferred)
this is my code
Function ggg(rng As Range) As Date
ggg = rng.value - 466699
ggg = CDate(ggg)
End Function