April 1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why does Friday, April 1, 2005 in a date formated cell generate a wrong data
type error when using the WEEKDAY formula?
 
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
 
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.
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top