Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Turn off Excel changing all date like strings to dates

I have a cell that I want my users to enter date of manufacture.
Examples a
03-01
06/07
They must match one of these patterns:
XX-XX
XX/XX

I want to keep these values as they were entered by the user. My
problem is Excel wants to turn them into dates when they are entered
by the user causing problems for my validation logic.

Is there a way I can tell Excel to translate data entered in these
cells as text and not to convert them to dates.

I have tried changing the cell type on Worksheet_Change but Excel has
already changed the data to a date.

Chrisso

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Turn off Excel changing all date like strings to dates

Silly me. I just had to set the target cells type to "Text" first.

Why do you find the solution to your prblem the moment you post it on
the newsgroup!?

Chrisso


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Turn off Excel changing all date like strings to dates

Either set the formatting for that column to text or have the user
enter a single apostrophe before the date, '03-01

Regards,
David Miller

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Turn off Excel changing all date like strings to dates

hi.
preformat the column as text or have users enter an apostrophe (') before
the data.

Regards
FSt1

"Chrisso" wrote:

I have a cell that I want my users to enter date of manufacture.
Examples a
03-01
06/07
They must match one of these patterns:
XX-XX
XX/XX

I want to keep these values as they were entered by the user. My
problem is Excel wants to turn them into dates when they are entered
by the user causing problems for my validation logic.

Is there a way I can tell Excel to translate data entered in these
cells as text and not to convert them to dates.

I have tried changing the cell type on Worksheet_Change but Excel has
already changed the data to a date.

Chrisso


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
why does numbers automaticly turn to dates in Excel? Joe New Users to Excel 1 February 10th 10 07:20 PM
Changing dates automatically with the computer date Sherees Excel Discussion (Misc queries) 2 December 16th 09 01:28 PM
Changing dates to date format Tigerxl Excel Discussion (Misc queries) 5 April 3rd 09 10:26 PM
Changing text dates to date serial numbers George[_5_] Excel Worksheet Functions 6 January 2nd 08 10:44 PM
changing dates in a date formated column ? Tim[_7_] Excel Discussion (Misc queries) 2 October 18th 07 03:53 AM


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

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"