+ Reply to Thread
Results 1 to 7 of 7

April 1

  1. #1
    alaskanrogue (Marc George)
    Guest

    April 1

    Why does Friday, April 1, 2005 in a date formated cell generate a wrong data
    type error when using the WEEKDAY formula?

  2. #2
    Duke Carey
    Guest

    RE: April 1

    Is it entered as a date, or as text?


    "alaskanrogue (Marc George)" wrote:

    > Why does Friday, April 1, 2005 in a date formated cell generate a wrong data
    > type error when using the WEEKDAY formula?


  3. #3
    Registered User
    Join Date
    02-25-2005
    Posts
    84
    Even though your date format is dddd, mmm d, yyyy, the formula bar should still only have 01/04/2005. In which case, =weekday should work.

    If you've formatted it to include text, the =weekday formula will error.

    To make sure, try testing it with =ISNUMBER(A1) to make sure its a proper number/date.

  4. #4
    Jason Morin
    Guest

    Re: April 1

    Probably because XL doesn't recognize it as a date. It
    just interprets it as a text string. If you just enter:

    April 1, 2005

    then XL will recognize it as a date.

    To convert your current text string to a legitimate date,
    use:

    =--MID(G1,FIND(" ",G1)+1,1024)

    and then format the date however you want.

    HTH
    Jason
    Atlanta, GA

    >-----Original Message-----
    >Why does Friday, April 1, 2005 in a date formated cell

    generate a wrong data
    >type error when using the WEEKDAY formula?
    >.
    >


  5. #5
    Harlan Grove
    Guest

    Re: April 1

    Jason Morin wrote...
    >Probably because XL doesn't recognize it as a date. . . .

    ....

    Testing is good.

    =WEEKDAY("April 1, 2005")

    returns 6 on my system. What does it return on yours?

    However,

    =WEEKDAY("April 1, 2005"&CHAR(160))

    returns #VALUE! even though the argument would *APPEAR* the same as the
    previous argument. So I think the safer bet is that the OP has stray
    nonbreaking spaces in the date string, in which case

    =WEEKDAY(SUBSTITUTE("April 1, 2005"&CHAR(160),CHAR(160)," "))

    returns 6.


  6. #6
    Myrna Larson
    Guest

    Re: April 1

    He said "Friday, April 1, 2005". I don't know whether that means the cell
    displays 'Friday' or not. If it does, then DateValue("Friday, April 1, 2005")
    gives an error.




    On 7 Apr 2005 12:32:42 -0700, "Harlan Grove" <hrlngrv@aol.com> wrote:

    >Jason Morin wrote...
    >>Probably because XL doesn't recognize it as a date. . . .

    >...
    >
    >Testing is good.
    >
    >=WEEKDAY("April 1, 2005")
    >
    >returns 6 on my system. What does it return on yours?
    >
    >However,
    >
    >=WEEKDAY("April 1, 2005"&CHAR(160))
    >
    >returns #VALUE! even though the argument would *APPEAR* the same as the
    >previous argument. So I think the safer bet is that the OP has stray
    >nonbreaking spaces in the date string, in which case
    >
    >=WEEKDAY(SUBSTITUTE("April 1, 2005"&CHAR(160),CHAR(160)," "))
    >
    >returns 6.



  7. #7
    Harlan Grove
    Guest

    Re: April 1

    Myrna Larson wrote...
    >He said "Friday, April 1, 2005". I don't know whether that means the

    cell
    >displays 'Friday' or not. If it does, then DateValue("Friday, April 1,

    2005")
    >gives an error.

    ....

    I overreacted. Sorry, Jason.


+ 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