+ Reply to Thread
Results 1 to 14 of 14

What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Hi,

    Not able to duplicate a #VALUE with that formula.

    This website talks about that error.

    https://support.office.com/en-us/art...7-acfc7766dfff

    Hope this is helpful.

    Cheers

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    How do you have your cells formatted ? I've formatted the range as TEXT and re=entered the times. Still #VALUE! error. Grrrrr ....
    Attached Files Attached Files
    Last edited by Logit; 12-04-2016 at 07:27 PM.

  4. #4
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Your input cells were formatted as text. You need to make sure Excel interprets the cells as times/dates. Type "12:00:00 AM" in a cell, for example. You can wrap that text in a TIMEVALUE function then refer to it.
    Last edited by JYTS; 12-04-2016 at 08:24 PM.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    I could not get the first formula to work for me. Not really certain what I was doing wrong.

    I was able to use the COUNTIF function as shown here in a test sheet environment:

    Please Login or Register  to view this content.
    This returns how many cells exceed the time range. From that, I can use a conditional formatting process for the remainder of the project.

    If anyone cares to send me a sample file using the TimeValue function, that would be great. I'd be interested in learning what I was doing wrong. Formulas are something I need to get better with.

    Thanks to all. Merry Christmas !

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    What's the answer supposed to be?
    - You have a time in E1 but the formula is A1:D1 vs A1:E1
    Since A1:D1 is an array, if you commit the formula with Ctrl-Shft-Enter, you get "TRUE" --> "Fail"

    If you use:=IF(1*(A2:D2)>(TIMEVALUE("12:00")),"Fail","OK"), the conditional evaluates to "FALSE" --> "Ok"
    Attached Files Attached Files
    Ben Van Johnson

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Hey Ben. Thanks for answering. I can't get the same result you get, not even using the example you sent me. I don't undestand why.

    I apologize for the confusion with the example file I posted. This has been spinning my mind most of the afternoon.

    If: A1 = 12:00......B1=12:00.....C1 = 12:00.....D1 = 12:01....... Using True / False , the response should be TRUE because of D1.


    If: A1 = 12:00......B1=12:00.....C1 = 12:00.....D1 = 12:00....... Using the same logic, it should return FALSE because none of the entries exceed 12:00.

    I've used the CTRL / SHIFT / ENTER and I have all cells formatted as TEXT. It always returns FALSE if the times are all less than 12:00 or if all or one exceed 12:00
    Just to be certain I've tried formatting the cells A:D as time - same response.

    I'm just not certain what I'm doing wrong here. I'm beginning to feel like .... well .... I can't say. I can't believe something this basic is kicking my backside.

  8. #8
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    A couple things...

    1. Sorry I don't know where the top half of my post went when I edited it. But, yes, that COUNTIF that I suggested is a good solution.

    2. You need to format the times as times. Not text. Excel doesn't see any difference between "banana" and "12:00" unless it is formatted as a time or wrapped in a TIMEVALUE function.

    3. It was unclear if you wanted ONE, AT LEAST ONE, -or- ALL of the inputs to be greater than 12:00 in order to return true. I found how to get to get that post back; it sounds like you want the second example:

    If you want to count the number of cells that are greater than 12:00, use this:

    =COUNTIF(A1:E1,">"&TIMEVALUE("12:00"))

    Then you can do something like:

    =IF(COUNTIF(A1:E1,">"&TIMEVALUE("12:00"))>0,"AT LEAST ONE FAIL","OK")

    If you need all four to be greater than 12:00 for it to fail:

    =IF(COUNTIF(A1:E1,">"&TIMEVALUE("12:00"))=4,"ALL FOUR FAILED","OK")
    4. protonLeah is suggesting using an array formula. I would not bother with this Excel abstraction until you are more familiar with functions in Excel. There's a tendency to suggest the shortest, fastest, most "clever," etc. solution to people who ask questions here, but if too often creates more confusion. It is a great solution and correct, no doubt, I just wouldn't stress over it not working for you.

    5. Make sure you have am/pm right. 12:01 AM < 11:59 AM.

    6. Workbook attached shows, first, the TIMEVALUE function being used to convert the text into values that Excel can work with. Below that is an example of entering times directly and formatting them as such.

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    JYTS:

    Thank you for your explanation. It is much clearer to me now.

    You mentioned
    6. Workbook attached shows, first, the
    ... did you mean you attached a workbook on your last post ? If so, it is not there. Or were you referring to * protonLeah * attachment ? I ask only because I am
    more visual than cerebral. It really helps if I can look at something and figure out how it works.

    Again, thank you. I'll mark this solved.

    Also ... THANK YOU to everyone who took time to become engaged with this thread. It means alot.

    Merry Christmas !

  10. #10
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Somehow my attachment got lost when I later deleted some. I recreated it in the attached.

    Glad to help.
    Attached Files Attached Files

  11. #11
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    JYTS

    Just trying to further understand. Your last attachment ... was it working for you prior to posting it ?

    Here is a screen shot:
    .
    Attached Images Attached Images

  12. #12
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Yep, look in F4 and F10.

  13. #13
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Thank you. I should have done a little more clicking on the cells. Thought those were just comments.

    Thank you again !

  14. #14
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: What Is Wrong With This TIMEVALUE Formula ? Gives #VALUE! error

    Glad I could help, Logit!

+ 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. Cells time for TIMEVALUE formula
    By umirin in forum Excel General
    Replies: 1
    Last Post: 08-31-2016, 10:44 AM
  2. [SOLVED] Error in Vlookup string: A value used in the formula is of the wrong data type.
    By Taylorim in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-20-2016, 08:20 AM
  3. Help creating a TIMEVALUE formula with greater than and less than
    By ExcelDummy77 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2013, 11:57 AM
  4. [SOLVED] VBA macro application.ontime timevalue error
    By Jack7774 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2013, 11:58 AM
  5. Replies: 4
    Last Post: 04-20-2012, 08:44 AM
  6. #VALUE! Error What wrong with formula
    By JohnDear in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2011, 01:26 PM
  7. timevalue deduction return wrong
    By only_lonely in forum Excel General
    Replies: 3
    Last Post: 11-11-2009, 10:30 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