Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can we define a date format in a cell

Hi Norman,
I would have agreed with you until recently.
I automated a worksheet for import shipping details.
The sheet is redrawn from scratch each time and all formatting cleared prior
to redraw.
All constants are automated and all variables are user entered via input
boxes to minimize error.
All is perfect..., except that the dates are erratic.
I live in Australia so the format is "dd-mm-yyyy" the problem is that no
matter how I enter the dates Excel reformats to "mm-dd-yyyy"
...no big deal you say???
It only does this for the 1st 12 days for the month. Then the date format
works fine...as directed by the format.
I've exhausted all brain cells & it's still driving me crazy.
Yes I've even resorted to the macro recorder to try & resolve the issue..
still no good.
Work that one out....!

"Norman Jones" wrote in message
...
Hi Dev,

If you pre-format the cell with the required date format,
any date subsequently inserted will be displayed in the
requisite format.


---
Regards,
Norman


"Dev" wrote in message
...
Hi there,

Can we define a date format in a cell to restrict only dates with
certain
formats can be entered.

Thanks for your help in advance.

Dev





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Can we define a date format in a cell

On Sun, 20 May 2007 02:18:13 GMT, "DAMAN" wrote:

Hi Norman,
I would have agreed with you until recently.
I automated a worksheet for import shipping details.
The sheet is redrawn from scratch each time and all formatting cleared prior
to redraw.
All constants are automated and all variables are user entered via input
boxes to minimize error.
All is perfect..., except that the dates are erratic.
I live in Australia so the format is "dd-mm-yyyy" the problem is that no
matter how I enter the dates Excel reformats to "mm-dd-yyyy"
..no big deal you say???
It only does this for the 1st 12 days for the month. Then the date format
works fine...as directed by the format.
I've exhausted all brain cells & it's still driving me crazy.
Yes I've even resorted to the macro recorder to try & resolve the issue..
still no good.
Work that one out....!


That behavior is typically due to your Windows Regional Settings (Start/Control
Panel/ ... then it depends on your version of Windows and CP display how you
get to it) being set to mm-dd-yy or something similar.

If you examine your entries carefully, you will likely see that the dates after
the 12th of the month are TEXT and not true DATES (or numbers).

Change your Windows Regional settings to Australian, and you should be OK.
Make sure the date format is DMY.
--ron
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
Generate sequential numbers with define format. Marcos Excel Worksheet Functions 3 December 30th 08 04:27 PM
How can I get date of file creation to XLS cell in date format? Radek Simek Excel Worksheet Functions 3 November 8th 07 04:24 PM
Can we define a date format in a cell Dev Excel Programming 6 May 18th 07 02:15 PM
Define a cell value base on the date BaseballFan Excel Discussion (Misc queries) 2 April 10th 07 01:51 AM
How do I define a Format Cell Number Category JimM Excel Programming 2 March 11th 05 03:51 PM


All times are GMT +1. The time now is 09:46 AM.

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

About Us

"It's about Microsoft Excel"