+ Reply to Thread
Results 1 to 8 of 8

DateValue Function Error

  1. #1
    Registered User
    Join Date
    08-26-2015
    Location
    Wellington, FL
    MS-Off Ver
    MS Office 2013
    Posts
    3

    DateValue Function Error

    I imported data from MS Project 2013 into an Excel worksheet (copy/paste). The data included some date values. In a second spreadsheet I used the HLOOKUP() function to bring in a set of column information in order to do standard reporting. When I tried to do some conditional formatting based on date column comparison I found it did not work. I realized the dates were text by using the ISTEXT() function. I tried using the DateValue() function in order to convert and do the comparisons, but keep getting a #Value! error. The columns are general format. Any suggestions?

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: DateValue Function Error

    I often get that issue with telecommunication databases.

    Go to a cell, and put a 1. Copy it. The select all of the dates or times, right-click, choose Paste Special, and then choose Multiply.

    The operation will coerce numerical values stored as text into actual values.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: DateValue Function Error

    another way may be to highlight the range, scroll back to the top and hover over the 1st cell in the range
    look for a small yellow diamond to appear - click it and select "Convert to Number"

    If that still does not work for you, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: DateValue Function Error

    Sometimes this will work...

    Select the range of cells in question
    Goto the Data tab>Text to columns
    Click Finish
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    08-26-2015
    Location
    Wellington, FL
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Re: DateValue Function Error

    I have attached a sample file. The file contains a worksheet with the data and a reporting worksheet. The reporting worksheet contains a text box explaining the desired conditional formatting. I did try the the various solutions with no success. The intent is to have no user intervention other than pasting in the data into the worksheet named DataSheet.
    Attached Files Attached Files

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: DateValue Function Error

    Your dates are not true Excel dates.

    If they always follow this format: ddd m/d/yy

    Then you can do something like this:

    D2 = Mon 8/3/15
    O2 = Mon 9/21/15

    =--MID($D2,5,8)<--MID($O2,5,8)

    =TRUE

  7. #7
    Registered User
    Join Date
    08-26-2015
    Location
    Wellington, FL
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Re: DateValue Function Error

    Thank you all for the replies/suggestions. I was able to create a "flag" column using Tony's suggestion and using that to perform the conditional formatting as well as view filtering, etc.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: DateValue Function Error

    You're welcome. We appreciate the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use COUNTIFS function on results of DATEVALUE function?
    By Si902 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-16-2015, 08:13 PM
  2. [SOLVED] Run time error if DateValue textboxes are blank
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2013, 08:55 AM
  3. [SOLVED] DateValue returns error
    By Debatewise in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-21-2013, 10:11 AM
  4. [SOLVED] Datevalue - Same value, one returns error?
    By Jaymond Flurrie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-08-2013, 11:35 AM
  5. Datevalue function
    By vioravis in forum Excel General
    Replies: 3
    Last Post: 01-19-2009, 09:45 AM
  6. Datevalue #Value error?
    By a94andwi in forum Excel General
    Replies: 4
    Last Post: 03-20-2007, 08:37 AM
  7. Using DateValue function
    By Ralph Elmerick in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-11-2005, 04:06 PM

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