LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
cdb cdb is offline
external usenet poster
 
Posts: 62
Default Date format changing on edit replace

I have a download that is putting some dates in with a leading space (where
it is a single digit date). I then need to use the networkdays formula on
this, but as there is a leading space it does not register this as a date. If
I manually edit replace the space with a zero this works fine, but if I use a
macro it causes problems - whether I use the edit - replace, or if I
substitute the first character using some other bit of code.
The problem I have is for dates like 7/06/2005 (7th June 2005). If I edit -
replace manually this become 07/06/2005, which is what I want. If I use some
code on this, it then become 06/07/2005 - which when using networkdays with
todays date it is giving me a negative number as this is in the future!
Can anyone give me some code to replace the leading space with a zero and
keep the correct formatting?

Cheers,
cdb
 
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
How can I edit the formula without changing the format? {=SUM(if. Martin Excel Worksheet Functions 3 June 6th 09 07:48 PM
find and replace for date format -D- Excel Discussion (Misc queries) 0 January 23rd 07 06:32 PM
cell format changing when when using search and replace. Excel Discussion (Misc queries) 0 January 6th 06 02:41 AM
cell format changing when when using search and replace. Excel Discussion (Misc queries) 0 January 6th 06 02:41 AM
how do i replace ( with / without changing format to fraction Splt Window Diner Excel Worksheet Functions 2 August 19th 05 10:00 PM


All times are GMT +1. The time now is 03:57 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"