#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Formatting Date

I have a column that contains dates in this format mm/dd/yyyy. I need
mmddyyyy no slashs. If I do a custom format it still shows mm/dd/yyyy in the
the fx bar. I have tried using vbscipt replace method and copy the new date
to a different column but it drops the zeros no matter what the columns
format is. I need to create passwords from this column and I have to take out
the slashes.




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Formatting Date

If your input is an actual date (9/16/2006)
then a custom format of MMDDYYYY will display: 09162006

But, if your input is 09162006
then Excel, not recognizing the value as a date,
will remove the leading zero and display: 9162006

For display purposes, you could create
a custom format of 00000000
which displays 9162006 as 09162006
(The leading zero would not actually exist,
but it would display)

OR
You could set the number format to TEXT
so Excel will retain and display anything you input

OR
You could just prefix your input with an apostrophe.
Consequently, '09162006 would be treated as text
and display as 09162006

Is any of of that rambling something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"newguy" wrote:

I have a column that contains dates in this format mm/dd/yyyy. I need
mmddyyyy no slashs. If I do a custom format it still shows mm/dd/yyyy in the
the fx bar. I have tried using vbscipt replace method and copy the new date
to a different column but it drops the zeros no matter what the columns
format is. I need to create passwords from this column and I have to take out
the slashes.




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Formatting Date

One more thought.....

For a date in A1

You might be able to use this formula to achieve what you want:
B1: =TEXT(A1,"MMDDYYYY")

If A1 contains the date 9/16/2006
B1 returns 09162006 (as text)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"newguy" wrote:

I have a column that contains dates in this format mm/dd/yyyy. I need
mmddyyyy no slashs. If I do a custom format it still shows mm/dd/yyyy in the
the fx bar. I have tried using vbscipt replace method and copy the new date
to a different column but it drops the zeros no matter what the columns
format is. I need to create passwords from this column and I have to take out
the slashes.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27,285
Default Formatting Date

The underlying cell has to contain a date for custom formatting to work.
The custom formatting doesn't change the underlying value stored in the
cell.

--
Regards,
Tom Ogilvy


"newguy" wrote in message
...
I have a column that contains dates in this format mm/dd/yyyy. I need
mmddyyyy no slashs. If I do a custom format it still shows mm/dd/yyyy in
the
the fx bar. I have tried using vbscipt replace method and copy the new
date
to a different column but it drops the zeros no matter what the columns
format is. I need to create passwords from this column and I have to take
out
the slashes.






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Formatting Date

That is the issue. I figured out a way to work with the / so I am good.
Thanks for your suggestions Ron.

"Tom Ogilvy" wrote:

The underlying cell has to contain a date for custom formatting to work.
The custom formatting doesn't change the underlying value stored in the
cell.

--
Regards,
Tom Ogilvy


"newguy" wrote in message
...
I have a column that contains dates in this format mm/dd/yyyy. I need
mmddyyyy no slashs. If I do a custom format it still shows mm/dd/yyyy in
the
the fx bar. I have tried using vbscipt replace method and copy the new
date
to a different column but it drops the zeros no matter what the columns
format is. I need to create passwords from this column and I have to take
out
the slashes.







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
Date formatting help [email protected] Excel Discussion (Misc queries) 3 September 6th 06 12:45 AM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Can a date be used for conditional formatting? Stevie P Excel Worksheet Functions 2 September 27th 05 09:42 PM
Conditional Formatting, date. DissentChick Excel Worksheet Functions 2 July 20th 05 03:37 PM
Despite formatting a column in Excel 2002 worksheet as Short Date. Pete Whalley Excel Discussion (Misc queries) 2 February 7th 05 06:17 PM


All times are GMT +1. The time now is 09:24 PM.

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"