79834190

Date: 2025-11-30 21:19:38
Score: 1
Natty:
Report link

It seems I overthought it. So it's fine to enter the date directly into cell("H2").

Function strgen()
    Dim dat As Variant
    Dim datstring As Variant
    dat = ThisWorkbook.Sheets("Sheet1").Range("H2").Value
    datstring = Format(dat, "mm.dd.yy")
    strgen = datstring & ".xlsm"
End Function
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: motosann