![]() |
|
#2
|
|||
|
|||
|
Hi Rod
With the example you gave the code below will change any cell with a date in the range on column I to 4/5 Using Replace will work for a range of cells with the same date, if there are different dates you will still have to loop through the dates. This is a start, if you want more help can you provide more detail & a better example etc Code:
Option Explicit
Sub ReplaceDates()
Dim Ws As Worksheet
Dim Rcell As Range
Dim sReplaceWith As String
sReplaceWith = "4/5"
Set Ws = ThisWorkbook.ActiveSheet
For Each Rcell In Ws.Range(Ws.Cells(19, 9), Ws.Cells(Rows.Count, 9).End(xlUp))
If IsDate(Rcell) Then
With Rcell
.NumberFormat = "@"
.Value = sReplaceWith
End With
End If
Next Rcell
End Sub
|
| Tags |
| find/replace macro not wk |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Find and Replace doesn't work.
|
Bop70 | Word | 3 | 02-04-2015 11:45 AM |
| Find and replace No longer work | TJH | Word | 3 | 03-25-2014 11:33 PM |
Find and Replace Macro
|
amparete13 | PowerPoint | 3 | 03-11-2014 05:29 AM |
| macro or find/replace | JamesVenhaus | Word | 2 | 02-27-2012 03:34 PM |
| Find and Replace Macro - A Better Way | Tribos | Word VBA | 0 | 10-08-2008 03:22 AM |