• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Error in format when Tagged

Rafay Ahmed

New Member
Attached is the picture, where when I am writing a phrase = "The month of " & S4 its not giving me date in that format.

Kindly help me fix this.
 

Attachments

  • excel question.PNG
    excel question.PNG
    38.3 KB · Views: 16
@AliGW has shown a standard US date format but pretty much anything is possible from there, including the translation of dates into other languages. In this case
= "The month of " & TEXT(S4,"MMMM-YYYY")
might fit the pattern.

= "Le mois de " & TEXT(S4,"[$-40C]mmmm-yyyy;@")
would be entirely a different thing!
 
@Khalid NGO

I like that idea. Apart from anything else, it means that the heading is still usable as a reference. The main problem would be that a number-formatted cell does not spill over to adjacent cells; either the cell would need to be wide or it would need to be merged with the adjacent cell.

Another option is to right justify the text in one cell and left-justify the formatted date in the next. Provided one clears the display of gridlines, that can convey the same message.
 
Hi Peter,
Yes you are right, cell need to be wide or merged to show complete text and date.

But using custom formatted cells we have advantage if the cell needs to be used for further calculations.
 
Back
Top