DateValue problem

B

Brongo

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel

There is probably a simple answer that I cannot see, but:
Cell A1 contains a date and the cell is formatted to to a date (eg: 03/11/2008) - UK style

Cell A2 contains: =DateValue(A1)

Simple.....but I get the #VALUE error. In fact I get it on all datevalue references to cells, but not on a date inserted in quotes into the formula.

H.E.L.P please
 
B

Bob Greenblatt

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel

There is probably a simple answer that I cannot see, but:
Cell A1 contains a date and the cell is formatted to to a date (eg:
03/11/2008) - UK style

Cell A2 contains: =DateValue(A1)

Simple.....but I get the #VALUE error. In fact I get it on all datevalue
references to cells, but not on a date inserted in quotes into the formula.

H.E.L.P please
You are getting the error because DATEVALUE requires its argument in text
format. When you pass a cell reference, the date gets passed as a date
serial number (the cell's value), NOT text (the cell's display).
 
B

Biff

Bob Greenblatt said:
You are getting the error because DATEVALUE requires its argument in text
format. When you pass a cell reference, the date gets passed as a date
serial number (the cell's value), NOT text (the cell's display).

So how do you fix it? I want to use a cell, not type in a date.
 
C

CyberTaz

So how do you fix it? I want to use a cell, not type in a date.

I'm not clear on what you are actually looking for - It sounds like you want
A2 to display the same as A1. If so, A2 need only contain the expression =A1
which you can then format as you wish for displaying the same date. If you
want the numerical value of the date displayed format the cell as Number or
General rather than as Date.

HTH |:>)
Bob Jones
[MVP] Office:Mac
 
B

Bob Greenblatt

So how do you fix it? I want to use a cell, not type in a date.
There is nothing to FIX. It is not broken. You are misunderstanding
something and I do not know what; so I can't properly explain a solution.
Like Cybertaz asked: What are you trying to do? Why do you feel the need to
use DATEVALUE?
 
B

Biff

Bob Greenblatt said:
There is nothing to FIX. It is not broken. You are misunderstanding
something and I do not know what; so I can't properly explain a solution.
Like Cybertaz asked: What are you trying to do? Why do you feel the need to
use DATEVALUE?
I have a date (3/1/2008)in F5. This is the formula in J5, =DATEVALUE(F5).
I want to see 39508 in J5. Instead I see #Value.
 
B

Bob Greenblatt

I have a date (3/1/2008)in F5. This is the formula in J5, =DATEVALUE(F5).
I want to see 39508 in J5. Instead I see #Value.
Just use the formula =J5 in F5 and format it as general.
 

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

Top