, , , .
, , , excel date formats that begin with (*) m/d/yyyy, US locale (, Excel ) .
, excel, excel , , VBA , , autofilter.
I have a function SetDate:
Function SetDate(refCell As Range) As String
If refCell.NumberFormat = "m/d/yyyy" And refCell.Text = Format(refCell.Value, "Short Date") Then
SetDate = Format(Now, "Short Date")
Else
SetDate = Format(Now, refCell.NumberFormat)
End If
End Function
However, this method still has a problem when working with the date format: dd-MMM-yyyywhich will display as dd-MM-yyyy.

source
share