ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Format Date along with Text (https://www.excelbanter.com/excel-worksheet-functions/216499-format-date-along-text.html)

Joe

Format Date along with Text
 
Cell A1 contains the date: December 31, 2008
I want cell A2 to display "Dec Before"
I tried =A1&" Before" which returned: 39813 Before
I tried =(MONTH(A1))&" Before" which returned: 12 Before
I can format the date as Dec just fine until I add the &" Before" to it.
When I add the &" Before" in the formula it forces the Dec to read as 12. How
do I force the 12 back to read Dec?

Marsh

Format Date along with Text
 
In A2, try Custom formats
For example, the format mmmm "before" will yield December before

"Joe" wrote:

Cell A1 contains the date: December 31, 2008
I want cell A2 to display "Dec Before"
I tried =A1&" Before" which returned: 39813 Before
I tried =(MONTH(A1))&" Before" which returned: 12 Before
I can format the date as Dec just fine until I add the &" Before" to it.
When I add the &" Before" in the formula it forces the Dec to read as 12. How
do I force the 12 back to read Dec?


JE McGimpsey

Format Date along with Text
 
One way:

=TEXT(A1,"mmm B\efor\e")

In article ,
Joe wrote:

Cell A1 contains the date: December 31, 2008
I want cell A2 to display "Dec Before"
I tried =A1&" Before" which returned: 39813 Before
I tried =(MONTH(A1))&" Before" which returned: 12 Before
I can format the date as Dec just fine until I add the &" Before" to it.
When I add the &" Before" in the formula it forces the Dec to read as 12. How
do I force the 12 back to read Dec?


JE McGimpsey

Format Date along with Text
 
And if you just want to *display* Dec Before,

A2: =A1

Format A2 with Format/Cell/Number/Custom mmm B\efor\e


In article ,
JE McGimpsey wrote:

One way:

=TEXT(A1,"mmm B\efor\e")



All times are GMT +1. The time now is 12:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com