VBA Code to Convert Active Cell to Date Format in Excel

This code converts the selected range from text format to date format.

VBA Code:

Sub ConvertTextToDate()
    Selection.NumberFormat = "mm/dd/yyyy"
    Selection.Value = Selection.Value
End Sub
Join Our Telegram Group techguruplus telegram group Join Our WhatsApp Group techguruplus whatsapp group

Leave a Comment