Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default cell date value

OK,
this must be an easy one.
I have a named cell. Start_date
The cell is formated as date. with a date value 7/1/2010
when trying to get the cell value I do not get the date
range("start_date").Value2
It comes out:
40360

so must be something easy.
anyone have an answer?
thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default cell date value

Greg,

Try this

Mydate = Format(Range("start_date"), "dd/mm/yyyy")

Mike

"greg" wrote:

OK,
this must be an easy one.
I have a named cell. Start_date
The cell is formated as date. with a date value 7/1/2010
when trying to get the cell value I do not get the date
range("start_date").Value2
It comes out:
40360

so must be something easy.
anyone have an answer?
thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default cell date value

Try

=Format(range("start_Date"),"dd-mm-yyyy")

If this post helps click Yes
---------------
Jacob Skaria


"greg" wrote:

OK,
this must be an easy one.
I have a named cell. Start_date
The cell is formated as date. with a date value 7/1/2010
when trying to get the cell value I do not get the date
range("start_date").Value2
It comes out:
40360

so must be something easy.
anyone have an answer?
thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default cell date value

thanks all


"Jacob Skaria" wrote in message
...
Try

=Format(range("start_Date"),"dd-mm-yyyy")

If this post helps click Yes
---------------
Jacob Skaria


"greg" wrote:

OK,
this must be an easy one.
I have a named cell. Start_date
The cell is formated as date. with a date value 7/1/2010
when trying to get the cell value I do not get the date
range("start_date").Value2
It comes out:
40360

so must be something easy.
anyone have an answer?
thanks





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default cell date value

Why are you using Value2? Try using this...

Range("Start_Date").Value

Or, you can format the date value from Value2 yourself....

Format(Range("Start_Date").Value2, "m/d/yyyy")

--
Rick (MVP - Excel)


"greg" wrote in message
...
OK,
this must be an easy one.
I have a named cell. Start_date
The cell is formated as date. with a date value 7/1/2010
when trying to get the cell value I do not get the date
range("start_date").Value2
It comes out:
40360

so must be something easy.
anyone have an answer?
thanks




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 make 1 date cell automatically change another date cell Scotty Excel Worksheet Functions 4 April 22nd 10 09:01 AM
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Automatically update a cell with a date based on anther cells date GPR GUY Excel Discussion (Misc queries) 2 November 3rd 08 03:57 PM
comparing abr. Date Text cell to a date formatted cell David B Excel Programming 0 April 24th 08 05:46 PM
How to update a cell if a specific date is included in a date rang mgavidia Setting up and Configuration of Excel 2 October 8th 05 12:53 AM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"