How to subsitute numbers for months

Hi ,

I’m trying to subsitute a bunch of numbers 1 to 12 as Jan to Dec.
Only 1 and 12 is correctly sustituted as Jan and Dec. 2 to 11 is still Jan, libreoffice thinks they are days and assumes its all Jan. How do I fix this ?

Thanks.
Nik

Convert it first in a date value:

=TEXT(DATE(2015;month;1);“MMM”)

Thanks. But when I used the function wizard and inserted this formula my result was #NAME?

For the “month” parameter insert the location of the cell you want to convert.

i.e. =TEXT(DATE(2015;A10;1);“MMM”

The 2015 (year) and the 1 (day) are simply fillers to keep formula happy.

1 Like

ok thanks I’ll try again

Hi

You did not specify why you wish to convert these numbers to month name. In some cases (including sorting) it may be useful to keep the information “number” even if it shows the name of the month. A simple technique for this:

  • Select the range containing the numbers
  • Edit Fill Series
  • Series Type: Date
  • Time Unit: Month
  • Start value: 2
  • Keep the range selected, Right click Format Cells code format: MMM

thanks! beautiful. worked very well. its because I have a series of data from year 2000 but all the months have been numbered 1 to 12, I want to convert them to months.