+ Reply to Thread
Results 1 to 15 of 15

Restricting format of date to text

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    6

    Restricting format of date to text

    Hi guys,

    I need to restrict entry of data in a particular cell. It must be in a "dd-mmm" format. But the catch is that it can't be in date format. It has to be only in text format. I need it in text format only, to be able to upload it to a custom software my office uses. The problem is whenever I enter "26-JUN" Excel automatically converts it to a date format.

    So to sum it up I need to be able to restrict entry of data in a cell to [number][number]-[char][char][char] without automatically converting it into a date format.

    Thank you.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Restricting format of date to text

    Precede your entry with single quote or Select the range and format it as text...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    05-17-2010
    Location
    Nigeria, Owerri
    MS-Off Ver
    Excel 2007 and 2013
    Posts
    255

    Re: Restricting format of date to text

    Go to: Format > Format Cells > Number > Date.

    Then select the date format you want.

  4. #4
    Registered User
    Join Date
    06-26-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Restricting format of date to text

    Hi Sixth Sense,

    I don't have a problem when I enter the data. The problem is there are about 15 people who enter the data and I have to make corrections in the end. So I want to restrict the type of data they enter. Only in the "dd-mmm" format but in text format.

    Thank you for responding!

  5. #5
    Registered User
    Join Date
    06-26-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Restricting format of date to text

    Hey st_judeo,

    The problem is I can't have it in date format. It has to be only in text format but it is entered in "dd-mmm" format.

    Thanks

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Restricting format of date to text

    It is not their fault to think about restring them... It is the assumption that the excel performs and changing the entries to date's.

    Mark those column/range formatting as Text to get rid of this issue...

  7. #7
    Registered User
    Join Date
    06-26-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Restricting format of date to text

    Hi Sixth Sense,

    I will do that. There is a small concern though.

    The entire range cannot be converted to text.

    Only if "Annual" is entered in A1 then B1 has to be automatically formatted to TEXT. If A1 has a other entries from the drop down box then there are other data validations I have applied for B1.

    Also I was wondering if there is any way I can restrict entry to only "dd-MMM" when the cell is in text format.

    Thank you

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Restricting format of date to text

    Quote Originally Posted by sourabh1201 View Post
    Also I was wondering if there is any way I can restrict entry to only "dd-MMM" when the cell is in text format. Thank you
    I am little bit unclear about the above quoted text can you please brief it?

  9. #9
    Registered User
    Join Date
    06-26-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Restricting format of date to text



    With a little bit of tinkering I have figured out how to keep it to TEXT format. But the issue is I get a lot of entries like "26jun" or "26/jun/2013" without any particular format and there are hundreds of entries which I cannot correct before uploading to the software. Eventhough the cell is in text format they should only be able to enter two numbers a hyphen and three alphabets in BOLD letters. Otherwise the software doesn't accept it. It only has to be "26-JUN" in TEXT format only. Any different and it is rejected!

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Restricting format of date to text

    Do right click on sheet tab and select view code and paste the below code. Return to excel and check...

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    06-26-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Restricting format of date to text

    Hi Sixth Sense,

    Worked brilliantly. Thanks a lot. Helped me reduce atleast two hours of work everyday. Very grateful for your support.

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Restricting format of date to text

    Glad it helps you and thanks for the feedback and rep

  13. #13
    Registered User
    Join Date
    08-07-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Restricting format of date to text

    Hi There,

    I have attached a file where one of the field has a value as "22-08" which is the address, however when this file is opened in excel that field is converted in to date2013-07-01_153310.jpg2013-07-01_165135.jpg.

    Please assist.

    Thank You,
    Musavir Pasha.

  14. #14
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Restricting format of date to text

    Hi Musavir Pasha,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

  15. #15
    Registered User
    Join Date
    08-07-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Restricting format of date to text

    He Buddy,

    Sorry for that, I could not find the way to start a new thread. Please assist.

    Thank You,
    Musavir Pasha.

+ 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