Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Convert month number to string

I have a master sheet in which date is stored in columns by month. Row 1 has
the year and row 2 has the month number (1 to 12).

There are presentation sheets that reference subsets of the master data and
on those sheets I would like to display a 3 char string for the month e.g.
'JAN' for month 1.

Any suggestions, please?
--
Graham
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Convert month number to string

On Wed, 15 Nov 2006 18:11:02 -0800, Graham
wrote:

I have a master sheet in which date is stored in columns by month. Row 1 has
the year and row 2 has the month number (1 to 12).

There are presentation sheets that reference subsets of the master data and
on those sheets I would like to display a 3 char string for the month e.g.
'JAN' for month 1.

Any suggestions, please?



=TEXT(DATE(2006,A2,1),"mmm")

(The year and day of the month are irrelevant for this purpose).


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Convert month number to string

Try this:

=TEXT(A1&"-1","mmm")



"Graham" wrote:

I have a master sheet in which date is stored in columns by month. Row 1 has
the year and row 2 has the month number (1 to 12).

There are presentation sheets that reference subsets of the master data and
on those sheets I would like to display a 3 char string for the month e.g.
'JAN' for month 1.

Any suggestions, please?
--
Graham

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Convert month number to string

Thanks Ron

So simple when you have the knowledge, or can figue out what to search for.

Thanks again.
--
Graham


"Ron Rosenfeld" wrote:

On Wed, 15 Nov 2006 18:11:02 -0800, Graham
wrote:

I have a master sheet in which date is stored in columns by month. Row 1 has
the year and row 2 has the month number (1 to 12).

There are presentation sheets that reference subsets of the master data and
on those sheets I would like to display a 3 char string for the month e.g.
'JAN' for month 1.

Any suggestions, please?



=TEXT(DATE(2006,A2,1),"mmm")

(The year and day of the month are irrelevant for this purpose).


--ron

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Convert month number to string

On Wed, 15 Nov 2006 18:52:02 -0800, Graham
wrote:

Thanks Ron

So simple when you have the knowledge, or can figue out what to search for.

Thanks again.


You're welcome. Glad to help.
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Convert month number to string

=TEXT(A1&"-1","mmm")
Neat solution!! but I think you meant to reference cell A2 not A1.

Also, dependant upon your regional settings, (in the UK for example) you
would need to use
=TEXT("1-"&A2,"mmm")

--
Regards

Roger Govier


"Teethless mama" wrote in
message ...
Try this:

=TEXT(A1&"-1","mmm")



"Graham" wrote:

I have a master sheet in which date is stored in columns by month.
Row 1 has
the year and row 2 has the month number (1 to 12).

There are presentation sheets that reference subsets of the master
data and
on those sheets I would like to display a 3 char string for the month
e.g.
'JAN' for month 1.

Any suggestions, please?
--
Graham



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Convert month number to string

On Thu, 16 Nov 2006 12:18:13 -0000, "Roger Govier"
wrote:

=TEXT(A1&"-1","mmm")

Neat solution!! but I think you meant to reference cell A2 not A1.

Also, dependant upon your regional settings, (in the UK for example) you
would need to use
=TEXT("1-"&A2,"mmm")


That's an advantage of using the DATE worksheet function -- it is not locale
dependent.


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
List File Properties - Author SS Excel Worksheet Functions 1 June 23rd 06 04:56 PM
Convert displayed number to absolute value jmorris305 Excel Discussion (Misc queries) 3 February 28th 06 01:27 AM
How to COnvert text string to number timtak Excel Discussion (Misc queries) 3 June 4th 05 04:57 AM
How to convert string to a date galsaba Excel Worksheet Functions 3 March 4th 05 05:20 PM
Convert week number into calendar month? WickyWick Excel Worksheet Functions 2 November 9th 04 09:01 PM


All times are GMT +1. The time now is 03:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"