+ Reply to Thread
Results 1 to 11 of 11

Timesheet code

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379
    Well it adjusts for the Month, i.e. February had 28 days in it, but each day is being displayed with an error, the top date being #VALUE! any suggestions?

  2. #2
    Bernie Deitrick
    Guest

    re: Timesheet code

    Did you put a valid year number in cell B1?

    --
    HTH,
    Bernie
    MS Excel MVP


    "ChrisMattock" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Well it adjusts for the Month, i.e. February had 28 days in it, but each
    > day is being displayed with an error, the top date being #VALUE! any
    > suggestions?
    >
    >
    > --
    > ChrisMattock
    > ------------------------------------------------------------------------
    > ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
    > View this thread: http://www.excelforum.com/showthread...hreadid=558817
    >




  3. #3
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379
    Yes I have done...

    =DATEVALUE($A$1& " " & ROW() - 1 & ", 2006") is the result that shows in the formula bar, but and error appears in the cell.

  4. #4
    Bernie Deitrick
    Guest

    re: Timesheet code

    Chris,

    It might be a regional date setting...

    Does

    =DATEVALUE("January 1, 2006")

    produce an error?


    If so, what are valid strings that DATEVALUE will work with on your computer?

    HTH,
    Bernie
    MS Excel MVP


    "ChrisMattock" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Yes I have done...
    >
    > =DATEVALUE($A$1& " " & ROW() - 1 & ", 2006") is the result that shows
    > in the formula bar, but and error appears in the cell.
    >
    >
    > --
    > ChrisMattock
    > ------------------------------------------------------------------------
    > ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
    > View this thread: http://www.excelforum.com/showthread...hreadid=558817
    >




  5. #5
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379
    No that doesn't work, here are some that do... (thanks a lot for all this)


    =DATEVALUE("8/22/2008")
    =DATEVALUE("22-AUG-2008")
    =DATEVALUE("2008/02/23")
    =DATEVALUE("5-JUL")

  6. #6
    Bernie Deitrick
    Guest

    re: Timesheet code

    Chris,

    Try changing

    Range("A2:A" & myDay + 1).FormulaR1C1 = _
    "=DATEVALUE(R1C1& "" "" & Row() - 1 & "", " & myYear & """)"


    to

    Range("A2:A" & myDay + 1).FormulaR1C1 = _
    "=DATEVALUE(Row() - 1 & "" "" & R1C1 & "" " & myYear & """)"



    HTH,
    Bernie
    MS Excel MVP


    "ChrisMattock" <[email protected]> wrote in message
    news:[email protected]...
    >
    > No that doesn't work, here are some that do... (thanks a lot for all
    > this)
    >
    >
    > =DATEVALUE("8/22/2008")
    > =DATEVALUE("22-AUG-2008")
    > =DATEVALUE("2008/02/23")
    > =DATEVALUE("5-JUL")
    >
    >
    > --
    > ChrisMattock
    > ------------------------------------------------------------------------
    > ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
    > View this thread: http://www.excelforum.com/showthread...hreadid=558817
    >




  7. #7
    Bernie Deitrick
    Guest

    re: Timesheet code

    OR (since I forgot the dashes....)

    Range("A2:A" & myDay + 1).FormulaR1C1 = _
    "=DATEVALUE(Row() - 1 & ""-"" & R1C1 & ""-" & myYear & """)"

    HTH,
    Bernie
    MS Excel MVP


    "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
    news:[email protected]...
    > Chris,
    >
    > Try changing
    >
    > Range("A2:A" & myDay + 1).FormulaR1C1 = _
    > "=DATEVALUE(R1C1& "" "" & Row() - 1 & "", " & myYear & """)"
    >
    >
    > to
    >
    > Range("A2:A" & myDay + 1).FormulaR1C1 = _
    > "=DATEVALUE(Row() - 1 & "" "" & R1C1 & "" " & myYear & """)"
    >
    >
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "ChrisMattock" <[email protected]> wrote in message
    > news:[email protected]...
    >>
    >> No that doesn't work, here are some that do... (thanks a lot for all
    >> this)
    >>
    >>
    >> =DATEVALUE("8/22/2008")
    >> =DATEVALUE("22-AUG-2008")
    >> =DATEVALUE("2008/02/23")
    >> =DATEVALUE("5-JUL")
    >>
    >>
    >> --
    >> ChrisMattock
    >> ------------------------------------------------------------------------
    >> ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
    >> View this thread: http://www.excelforum.com/showthread...hreadid=558817
    >>

    >
    >




+ 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