+ Reply to Thread
Results 1 to 12 of 12

Custom Number format

Hybrid View

rlsublime Custom Number format 08-23-2012, 01:00 PM
dilipandey Re: Custom Number format 08-23-2012, 01:05 PM
rlsublime Re: Custom Number format 08-23-2012, 01:23 PM
dilipandey Re: Custom Number format 08-23-2012, 01:25 PM
rlsublime Re: Custom Number format 08-23-2012, 01:46 PM
rlsublime Re: Custom Number format 08-23-2012, 02:03 PM
Marcol Re: Custom Number format 08-23-2012, 02:31 PM
rlsublime Re: Custom Number format 08-23-2012, 02:47 PM
Marcol Re: Custom Number format 08-23-2012, 02:54 PM
shg Re: Custom Number format 08-23-2012, 03:01 PM
Marcol Re: Custom Number format 08-23-2012, 03:14 PM
ChemistB Re: Custom Number format 08-23-2012, 03:15 PM
  1. #1
    Forum Contributor
    Join Date
    11-20-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2010
    Posts
    284

    Custom Number format

    is there a way for me to do a custom format in excel that will convert the date from 1/5/2011 to 1/1/2011. so basically I am trying to keep the following format : mm/01/yyyy. I tried entering this as a custom format but it did not work. Thanks

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Custom Number format

    HI risublime,

    Try using below custom format:-
    m/"1"/yyyy

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Forum Contributor
    Join Date
    11-20-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2010
    Posts
    284

    Re: Custom Number format

    Thanks that worked, But I realized that I would want it to display it as Jan-12 while still maintaining this rule:m/"1"/yyyy. Is there a way to do this? Thanks

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Custom Number format

    Hi rlsublime..

    Custom format is for display only.. either m/"1"/yyyy OR mmm-yy

    Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Forum Contributor
    Join Date
    11-20-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2010
    Posts
    284

    Re: Custom Number format

    is there a way to permanantly convert the dates to that format using vba perhaps or any other way? Thanks

  6. #6
    Forum Contributor
    Join Date
    11-20-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2010
    Posts
    284

    Re: Custom Number format

    I am basically trying to add it to a pivot table and sort by month. So if I have the following months, I want the pivot to group it in for eg "Jan-11 instead of having 1/1/2011, 1/2/2011 etc

    Here is a sample data month range
    07/22/2011
    07/25/2011
    07/26/2011
    07/27/2011
    07/28/2011
    07/29/2011
    08/01/2011
    08/02/2011
    08/03/2011
    08/04/2011
    08/05/2011
    08/08/2011
    08/09/2011
    08/10/2011
    08/11/2011
    08/12/2011
    08/15/2011
    08/16/2011
    08/17/2011
    08/18/2011
    08/19/2011
    08/22/2011

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Custom Number format

    You could possibly convert your list
    1/.
    Formula: copy to clipboard
    =DATE(YEAR(A2),MONTH(A2),1)

    2/.
    Formula: copy to clipboard
    =TEXT(A2,"mmm")

    3/.
    Formula: copy to clipboard
    =TEXT(A2,"mmm - yy")


    Or some other varietion to suit your needs
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  8. #8
    Forum Contributor
    Join Date
    11-20-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2010
    Posts
    284

    Re: Custom Number format

    is there any way to do something like this =TEXT(A2,"mm/01/yyyy")

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Custom Number format

    Try, to return a string
    Formula: copy to clipboard
    =TEXT(A2,"mm")&"/01/"&TEXT(A2,"yyyy")

    Or to return a serial date
    Formula: copy to clipboard
    =DATEVALUE(TEXT(A2,"mm")&"/01/"&TEXT(A2,"yyyy"))


    Check the last one against your Regional Date Variation (USA style)
    Last edited by Marcol; 08-23-2012 at 03:10 PM. Reason: Added another possibility

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Custom Number format

    Or =A2-DAY(A2)+1 and format however you wish.
    Entia non sunt multiplicanda sine necessitate

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Custom Number format

    @ shg
    There are a million and one ways to do things .... that's the one I didn't think of ...

  12. #12
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Custom Number format

    You should be able to group your pivot table by month assuming that your dates are stored as numbers and not strings.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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