+ Reply to Thread
Results 1 to 27 of 27

Excel 2007 : Date cells not being identified as dates !

  1. #1
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12

    Date cells not being identified as dates !

    Greetings,

    after spending many hours and days trying to fix this problem, i could not solve it and i am here asking for your help

    I am looking for a way to control the inactivity of people in my irc channel/server.

    So, what i do is:
    1- in irc i do a "/msg nickserv info XXX" the output information would look like this.
    Please Login or Register  to view this content.
    Good, with replace, i ge rid of useless info, like the last message rolls.
    Please Login or Register  to view this content.
    So, now i created a formula to:
    *1* print in a specific column (Name), the nick (XXX and ZZZ). (I am not interested in the is ZZTTRR and is UUUTTTDDD)
    *2* print the date registered in another column (Registered)
    *3* TODAY() - "the printed registered date" in another column (Age)
    *4* print the last seen date to another column (Last seen)
    *5* TODAY() - "the printed last seen date" in another column (Inactivity)


    Everything seem to be working really good.

    The problem is that in the dates printed on *2* and *4* are not being seen as dates, so the TODAY()- "the cells" (on *3* and *5*), wont work, because "TODAY()- Apr 12,2008" is not possible ?

    what am i missing here . . . ?


    Please, i believe the BIG formula is correct . . .

    edit,

    between, i forgot to mention that the output text is not always in the same "format".

    Sometimes, this pops up:
    Please Login or Register  to view this content.
    So, i had to tell Excel that online=today

    Anyway, i worked this out too . . .
    Attached Files Attached Files
    Last edited by Tuche; 07-14-2008 at 02:51 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can wrap the date in the DateValue() function which converts date string to actual date value...

    e..g =TODAY()-DATEVALUE("Apr 12,2008")


    you can replace the date string with a cell reference containing it or a formula that results in it...
    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
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Thanks,

    i just tried that and still not working.
    =TODAY()-DATEVALUE(B2)

    B2 = Apr 19, 2008

    Hehe after a so complex formula i made, i can not belive this small thing with dates is holding me off

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How is not working? Do you get an error or a wrong value?

    You sheet doesn't help as you have Value errors in column B and I don't see the formulas that got them...

    try saving as Excel 2003 and then attaching...

  5. #5
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    =TODAY()-DATEVALUE("Apr 19, 2008")

    gives me #VALUE!

    weird, why can you not see my formulas of B and D ?

  6. #6
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    in xls (97) it breaks everything, too many levels of nesting . . .

    on xlsx B2,
    Please Login or Register  to view this content.
    on xlsx D2,
    Please Login or Register  to view this content.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Tuche
    =TODAY()-DATEVALUE("Apr 19, 2008")

    gives me #VALUE!

    weird, why can you not see my formulas of B and D ?
    I get 86 as a result of that formula...

    I don't have XL2007 so my converter screws something up when trying to convert to 2003 and removes some of your formulas...

  8. #8
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Hum that is weird, what could be causing the problem with TODAY()-DATEVALUE(Apr 22, 2008) ?

    Any option ?

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You have to put the date in quotations... or reference a cell that has the date in a string format instead of an actual date format...

  10. #10
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Yes, i did.

    To test, i just created a new blank document.

    In the first cell, i enter . . .

    Please Login or Register  to view this content.
    and get #VALUE!

    What is going wrong here

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    What happens if you use this instead?

    =TODAY( )-"Apr 19, 2008"+0

  12. #12
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    #VALUE !

    something is really screwed here . . .

    do you think a reinstall would fix it ?

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try the formula first in a brand new workbook.... just to make sure it's not something in your workbook causing the issue...

    Also.. do you get same error with this: =TODAY( )-"19 Apr, 2008"+0
    Last edited by NBVC; 07-14-2008 at 03:51 PM.

  14. #14
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Yes, i did exactly that.

    Closed everything, then opened Excel and started a blank new workbook . . .


  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try opening the attached and see what you get in cell A1.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Thanks a lot for the support NBVC !

    But i got a bit angry that the error is not on my side but something wrong with Excel . . .

    LoL, just to think the time i lost on just this small date thing . . .
    TODAY - B2


    So, i uninstalled it, will do a small clean up here, restart and reinstall it . . .

    Hopefully will fix it . . .

  17. #17
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Quote Originally Posted by NBVC
    Try opening the attached and see what you get in cell A1.

    Damn, uninstalled, did a small clean up, restarted, reinstalled in a different driver and folder . . .

    I open your file and i get #VALUE!

    What is wrong with my Excel ?

    Windows Vista x64
    M.Excel 2007

    It must be an option, right ?


  18. #18
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    could it be the way your date is written? Perhaps it has to do with the way date/time is setup on your system?

    e.g

    Try:

    =Today()-Datevalue("19 Apr, 2008")

    and other possible versions...

  19. #19
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    That last one worked . . . 86 !

    Now i need to find a way to fix my dates in my file . . . *wonders*

  20. #20
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by Tuche
    What is wrong with my Excel ?
    Probably nothing.

    I also get a #VALUE error with NBVC's file. That's because US (or Canadian) regional settings recognise "mmm dd, yyyy" as a valid date format....but UK (and probably German) regional settings don't.

    Can you change the date format? dd-mmm-yyyy is universal, i.e. "19-Apr-2008" or do that conversion within your formula, e.g.

    =TODAY()-SUBSTITUTE(REPLACE(B2,1,FIND(" ",B2),""),", ","-"&LEFT(B2,3)&"-")

    format as general

  21. #21
    Registered User
    Join Date
    07-14-2008
    Location
    Hamburg, Germany
    Posts
    12
    Thanks daddylonglegs,

    are you sure that formula is correct, my head hurts already . . .

  22. #22
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Sorry for leading you somewhat astray Tuche... I didn't think that the way the date was written within the DATEVALUE function mattered at first... I don't play with dates much, let alone change and play with date settings... I just took a guess at the end and I guess it was right....

  23. #23
    Registered User
    Join Date
    11-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Date cells not being identified as dates !

    A student of mine is experiencing the same problem working with Excel 2007 on a laptop. Is there an Excel setting that might be causing this error?

    In future I'll read ALL the replies before posting!!!
    Last edited by jonesie; 11-17-2009 at 04:33 PM.

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

    Re: Date cells not being identified as dates !

    Sorry...

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  25. #25
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: Date cells not being identified as dates !

    Quote Originally Posted by Tuche View Post
    Thanks daddylonglegs,

    are you sure that formula is correct, my head hurts already . . .
    Bitte werfen Sie einen Blick ( take a look )
    Attached Files Attached Files

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

    Re: Date cells not being identified as dates !

    A little late trucker10... that thread ended in July 2008!

  27. #27
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: Date cells not being identified as dates !

    Quote Originally Posted by NBVC View Post
    A little late trucker10... that thread ended in July 2008!
    oops sorry, I had not seen the date

+ 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