+ Reply to Thread
Results 1 to 3 of 3

How to Write dd/mm/yyyy as Text (March-13)

Hybrid View

hjames How to Write dd/mm/yyyy as... 04-25-2013, 07:19 AM
zbor Re: How to Write dd/mm/yyyy... 04-25-2013, 07:26 AM
hjames Re: How to Write dd/mm/yyyy... 04-25-2013, 07:33 AM
  1. #1
    Registered User
    Join Date
    03-18-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    How to Write dd/mm/yyyy as Text (March-13)

    Hi Peeps

    Having some trouble getting my VBA code to write "March-13" as text, rather than 01/03/2013

    Can anyone suggest some code that will make it write it as the text, "March-13"

    My current code is:

    Cells(emptyRow, 1).Value = VarMonth
    where, VarMonth is a cell on the sheet with, "March-13" written in it

    Many thanks for your help!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,061

    Re: How to Write dd/mm/yyyy as Text (March-13)

    Try
    Format(variable, "mmmm-yy")
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    03-18-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to Write dd/mm/yyyy as Text (March-13)

    Hi zbor

    That does work, however, when I click on the cell, it shows as dd/mm/yyyy - which means when I use it in a pivot table, it appears as 01/03/2013 rather than how it looks on the sheet as "March-13"

    hope that makes sense?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1