Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find and Replace - Auto Cell Formats

I have a column of date data that is in text format by design. I want
to do a find and replace for this column to change "/2003" to "/03",
"/2004" to "/04", etc. I have coded this into my macro, but Excel
automatically sets the cell format to a date type when the find and
replace occurs. Is there any way to stop this from happening? Can I
lock the format of these cells?

Thanks!



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Find and Replace - Auto Cell Formats

If you place a single quote in front of each cell entry ('), it will be treated as text and the replace will leave the entry as
text.

--

John Green - Excel MVP
Sydney
Australia


"bslater" wrote in message ...
I have a column of date data that is in text format by design. I want
to do a find and replace for this column to change "/2003" to "/03",
"/2004" to "/04", etc. I have coded this into my macro, but Excel
automatically sets the cell format to a date type when the find and
replace occurs. Is there any way to stop this from happening? Can I
lock the format of these cells?

Thanks!



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



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
Find & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
Find and Replace formatting formats the ENTIRE cell Duy Nguyen Excel Discussion (Misc queries) 2 April 16th 07 02:28 PM
Problems with number formats when using Find/Replace Bill Excel Discussion (Misc queries) 3 July 27th 06 12:39 AM
Is it possible to do a Find/Replace on Conditional Formats? [email protected] Excel Worksheet Functions 2 October 21st 05 01:33 PM
Find and Replace (mixed formats) pnmaggs2001 Excel Discussion (Misc queries) 3 October 13th 05 11:12 AM


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