View Single Post
  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default

It's not a formula created this way, it is just a date value.and so it will
work the same as if you input say 1/1/2005 directly. SO don't work with
another string date (whatever you mean by that), but just a standard date.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peter Rooney" wrote in message
...
Chip,

Talk about setting myself up for a fall..!

...except that I can't make it work. If I subtract a cell containing a
formula created in this way from a cell with a non-string date in it, I

get
#VALUE!

If I subtract the cell from a cell with another string date in it, I get

the
same thing.

And if I use datevalue(a1)-datevalue(a2) where both cells contain string
dates, I get the same thing too.

What am I doing wrong?

And to think this started off as someone ELSE's problem :o)

Pete




"Chip Pearson" wrote:

Peter,

You can certainly do date arithmetic on the date value in the
cell.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Peter Rooney" wrote in
message
...
Chip,

The only problem with this is it returns a label, which isn't
helpful if you
want to do date maths (I know this contributor didn't say he
wanted to, but I
do quite a lot)
My suggestion, although a bit unwieldy, does give you a
"valued" and
"mathable" date.
By the way, your web site is superb! Keep up the good work!

Pete (waiting to be proved wrong on the above...)



"Chip Pearson" wrote:

Use code like

ActiveCell.Value = Format(Now,"mm/dd/yyyy")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"mrbalaje" wrote in
message
...
I am using macros in my excel sheets. Can anyone tell me how
i
can assign the
current date using macros.