Conversion of DOB to full words
Solved/Closed
jigs
-
20 Feb 2016 à 21:06
gane@1987 Posts 1 Registration date Friday 3 March 2017 Status Member Last seen 3 March 2017 - 3 Mar 2017 à 10:12
gane@1987 Posts 1 Registration date Friday 3 March 2017 Status Member Last seen 3 March 2017 - 3 Mar 2017 à 10:12
Related:
- Dob in words
- Dob to word converter - Best answers
- Dob word - Best answers
- Date of birth in words ✓ - Excel Forum
- Convert date of birth in word ✓ - Excel Forum
- How to convert date into words ✓ - Word Forum
- Convert date of birth into words - Excel Forum
- Convert date of birth into words ✓ - Excel Forum
4 responses
vcoolio
Posts
1411
Registration date
Thursday 24 July 2014
Status
Contributor
Last seen
6 September 2024
262
21 Feb 2016 à 04:26
21 Feb 2016 à 04:26
Hello Jigs,
This will require a UDF (User Defined Function), not just a simple formula.
Read the following post (post #2) by Rick Rothstein way back in 2012. He has supplied an excellent solution for the OP which will work for you also.
https://www.mrexcel.com/board/threads/convert-date-to-words.615519/
Place the UDF in a standard module. I have modified it as follows to allow for proper English grammar and punctuation in the end result:-
If your date is in say, cell A1, place this formula in cell B1 (or wherever you like):
Read Rick's post carefully and remember that this is his work solely.
I hope that this helps.
Cheerio,
vcoolio.
This will require a UDF (User Defined Function), not just a simple formula.
Read the following post (post #2) by Rick Rothstein way back in 2012. He has supplied an excellent solution for the OP which will work for you also.
https://www.mrexcel.com/board/threads/convert-date-to-words.615519/
Place the UDF in a standard module. I have modified it as follows to allow for proper English grammar and punctuation in the end result:-
Function DateToWords(ByVal DateIn As Variant) As String
Dim Yrs As String
Dim Hundreds As String
Dim Decades As String
Dim Tens As Variant
Dim Ordinal As Variant
Dim Cardinal As Variant
Ordinal = 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", _
"Thirty first")
Cardinal = Array("", "One", "Two", "Three", "Four", _
"Five", "Six", "Seven", "Eight", "Nine", _
"Ten", "Eleven", "Twelve", "Thirteen", _
"Fourteen", "Fifteen", "Sixteen", _
"Seventeen", "Eighteen", "Nineteen")
Tens = Array("Twenty", "Thirty", "Forty", "Fifty", _
"Sixty", "Seventy", "Eighty", "Ninety")
DateIn = CDate(DateIn)
Yrs = CStr(Year(DateIn))
Decades = Mid$(Yrs, 3)
If CInt(Decades) < 20 Then
Decades = Cardinal(CInt(Decades))
Else
Decades = Tens(CInt(Left$(Decades, 1)) - 2) & " " & _
Cardinal(CInt(Right$(Decades, 1)))
End If
Hundreds = Mid$(Yrs, 2, 1)
If CInt(Hundreds) Then
Hundreds = Cardinal(CInt(Hundreds)) & " Hundred and "
Else
Hundreds = ""
End If
DateToWords = Ordinal(Day(DateIn) - 1) & " day of " & _
Format$(DateIn, "mmmm, ") & _
Cardinal(CInt(Left$(Yrs, 1))) & _
" Thousand, " & Hundreds & Decades
End Function
If your date is in say, cell A1, place this formula in cell B1 (or wherever you like):
=DateToWords(A1)
Read Rick's post carefully and remember that this is his work solely.
I hope that this helps.
Cheerio,
vcoolio.
22 Feb 2016 à 04:45
23 Feb 2016 à 07:34
3 Mar 2017 à 10:12
Dim Yrs As String
Dim Hundreds As String
Dim Decades As String
Dim Tens As Variant
Dim Ordinal As Variant
Dim Cardinal As Variant
Ordinal = 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", _
"Thirty first")
Cardinal = Array("", "One", "Two", "Three", "Four", _
"Five", "Six", "Seven", "Eight", "Nine", _
"Ten", "Eleven", "Twelve", "Thirteen", _
"Fourteen", "Fifteen", "Sixteen", _
"Seventeen", "Eighteen", "Nineteen")
Tens = Array("Twenty", "Thirty", "Forty", "Fifty", _
"Sixty", "Seventy", "Eighty", "Ninety")
DateIn = CDate(DateIn)
Yrs = CStr(Year(DateIn))
Decades = Mid$(Yrs, 3)
If CInt(Decades) < 20 Then
Decades = Cardinal(CInt(Decades))
Else
Decades = Tens(CInt(Left$(Decades, 1)) - 2) & " " & _
Cardinal(CInt(Right$(Decades, 1)))
End If
Hundreds = Mid$(Yrs, 2, 1)
If CInt(Hundreds) Then
Hundreds = Cardinal(CInt(Hundreds)) & " Hundred and "
Else
Hundreds = ""
End If
DateToWords = Ordinal(Day(DateIn) - 1) & " day of " & _
Format$(DateIn, "mmmm, ") & _
Cardinal(CInt(Left$(Yrs, 1))) & _
" Thousand, " & Hundreds & Decades
End Function
If your date is in say, cell A1, place this formula in cell B1 (or wherever you like):
=DateToWords(A1)
A1-- 23/09/1995
B1--Twenty third day of September, One Thousand, Nine Hundred and Ninety Five.
I want this type of format.. please help how it work...
A1--22/02/2012
B1--Twenty Two February, Two Thousand Tweleve.
please help Dear users.