+ Reply to Thread
Results 1 to 7 of 7

Getting date value from custom cell format

  1. #1
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Getting date value from custom cell format

    Hi

    I have a column of cells that are formatted as custom: mm/dd/yyy.
    I want to use a worksheet function to turn them into a date value.
    DATEVALUE() does not work. Is there any other way to do this?

    Thanks

    Dave
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Getting date value from custom cell format

    Can you give an example of what you mean by converting to a datevalue?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Getting date value from custom cell format

    Hmm, that is tough to do.
    I'm working with a separate program that runs through excel. It is giving me an output with a column of dates, but they are custom formatted. When I try to set up a filter, it doesn't work because it sees them as text, but I need them numbers, so I can only include records >= a certain date.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Getting date value from custom cell format

    Maybe you can try this.

    Select the column and go to data|text to columns.. skip to 3rd window and select Date from the column data format area, then choose MYD from adjacent drop down... Click Finish.. does it fix?

  5. #5
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Getting date value from custom cell format

    That does change them, but I need to use a worksheet function because I need the program to do calculations on them before it creates the output.

    I've posted an example that has my custom format and the example of the datevalue() result. Same thing happens for Value().
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Getting date value from custom cell format

    I am still not grasping what you want to achieve.. if you simply enter =A1 you get the same value.. if you format it as General you will get the serial number representation of the date...

    Maybe you can tell us what you ultimately need to do.. ie describe what your final formula needs to be doing...

  7. #7
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Getting date value from custom cell format

    Maybe there is a different issue at fault, let me play around some more with it and if I need more help I'll ask.

    Thank you very much for your time and effort!
    God Bless

+ 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