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

I am trying to write a search and replace macro to
replace 01/01/1900 with N/A. It refuses to work. I am
using Excel 2000.

Here is the following to reproduce the problem.

Start a new excel spreadsheet. Key Test into A1 and
01/01/1900 into cell A2. Create the following macro and
run it.

Sub Search_And_Replace()

Worksheets("Sheet1").Columns("A").Replace _
What:="Test", Replacement:="N/A", _
SearchOrder:=xlByColumns, MatchCase:=True

Worksheets("Sheet1").Columns("A").Replace _
What:="01/01/1900", Replacement:="N/A", _
SearchOrder:=xlByColumns, MatchCase:=True

End Sub

It happily replaces Test with N/A but not 01/01/1900.
What am I doing wrong??
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
Search and Replace Rebecca Excel Discussion (Misc queries) 1 May 14th 05 11:53 AM
Search and Replace Rebecca New Users to Excel 3 February 27th 05 09:29 PM
Search and replace This Guy Excel Worksheet Functions 0 January 5th 05 06:02 PM
search & replace Joe Excel Worksheet Functions 0 November 9th 04 02:55 PM
search & replace joe_may Excel Worksheet Functions 1 November 8th 04 11:16 PM


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