Excel, how do I write a macro to convert the date value to text?
Sub ConvertDates()
Dim cell as Range
for each cell in selection
cell.value = "'" & cell.Text
cell.Numberformat = "General"
Next
End Sub
select the cells to convert and run the macro.
--
Regards,
Tom Ogilvy
"airedale girl" wrote:
My worksheet contains several thousand records in which I have 3 columns with
date values. I need to know how to write a macro that would add a tick mark
to the beginning of each date to convert it to a text format.
|