Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to Quickly convert date to words in Excel?

In general, we usually convert the date to other date formats or digits in Excel, but have you ever encountered a problem about converting the date to English words as below screenshot shown? Actually, there is no built-in function that can handle it but a VBA code.
doc date to words 1

Convert date to word with Defined Function

Convert date to word with Defined Function

Here is a macro code that can do you a favor on converting dates to words.

1. Enable the sheet you use and press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module and paste below code to the script.

VBA: Convert date to word

Function DateToWords(ByVal xRgVal As Date) As String
    Dim xYear As String
    Dim Hundreds As String
    Dim Decades As String
    Dim xTensArr As Variant
    Dim xOrdArr As Variant
    Dim xCardArr As Variant
    xOrdArr = Array("First", "Second", "Third", _
                   "Fourth", "Fifth", "Sixth", _
                   "Seventh", "Eighth", "Nineth", _
                   "Tenth", "Eleventh", "Twelfth", _
                   "Thirteenth", "Fourteenth", _
                   "Fifteenth", "Sixteenth", _
                   "Seventeenth", "Eighteenth", _
                   "Nineteenth", "Twentieth", _
                   "Twenty-first", "Twenty-second", _
                   "Twenty-third", "Twenty-fourth", _
                   "Twenty-fifth", "Twenty-sixth", _
                   "Twenty-seventh", "Twenty-eighth", _
                   "Twenty-nineth", "Thirtieth", _
    xCardArr = Array("", "One", "Two", "Three", "Four", _
                   "Five", "Six", "Seven", "Eight", "Nine", _
                   "Ten", "Eleven", "Twelve", "Thirteen", _
                   "Fourteen", "Fifteen", "Sixteen", _
                   "Seventeen", "Eighteen", "Nineteen")
    xTensArr = Array("Twenty", "Thirty", "Forty", "Fifty", _
               "Sixty", "Seventy", "Eighty", "Ninety")
    xYear = CStr(Year(xRgVal))
    Decades = Mid$(xYear, 3)
    If CInt(Decades) < 20 Then
        Decades = xCardArr(CInt(Decades))
        Decades = xTensArr(CInt(Left$(Decades, 1)) - 2) & "-" & _
                xCardArr(CInt(Right$(Decades, 1)))
    End If
        Hundreds = Mid$(xYear, 2, 1)
    If CInt(Hundreds) Then
        Hundreds = xCardArr(CInt(Hundreds)) & " Hundred "
        Hundreds = ""
    End If
    DateToWords = xOrdArr(Day(xRgVal) - 1) & _
                  Format$(xRgVal, " mmmm ") & _
                  xCardArr(CInt(Left$(xYear, 1))) & _
                  " Thousand " & Hundreds & Decades
End Function

doc date to words 2

3. Save the code and go back to the sheet, select a cell which you will output the result in, type this formula =DateToWords(A1) (A1 is the date you use), press Enter key and drag auto fill handle to over the cells you need. See screenshot:
doc date to words 3

Spell Out Number

doc spell out number 1

Relative Articles:

Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    zia khan · 5 months ago
    its work good but i want for 90's "Nineteen Hundred " not "One thousand Nine hundred "... thanks!
    • To post as a guest, your comment is unpublished.
      Arjun · 3 months ago
      "Nineteen Hundred" is spoken English, it's wrong actually.
    • To post as a guest, your comment is unpublished.
      Sunny · 5 months ago
      Sorry, zia khan, I do not what you mean that convert 90 to nineteen hundred. The VBA only can convert date to words, the Split Out Number utiity convert numbers to English currency words
  • To post as a guest, your comment is unpublished.
    Alok Ghosh · 6 months ago
  • To post as a guest, your comment is unpublished.
    Ben Holman · 6 months ago
    Fixed the hyphen after the 20, 30, 40, etc.

    Add this after "If CInt(Decades) < 20 Then
    Decades = xCardArr(CInt(Decades))"

    ElseIf CInt(Decades) Like "*0" Then
    Decades = xTensArr(CInt(Left$(Decades, 1)) - 2)
  • To post as a guest, your comment is unpublished.
    Ben · 6 months ago
    This puts a hyphen after decades over 20 that end in zero.
  • To post as a guest, your comment is unpublished.
    Muhammad Hafiz · 8 months ago
    datetowords Formula has not working in all exall files

    • To post as a guest, your comment is unpublished.
      Sunny · 7 months ago
      Sorry, could you tell me which type of excel files cannot work?