Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-28-2016, 06:37 PM
Rod_Bowyer Rod_Bowyer is offline Macro to Find and Replace Does Not Work - But Works Manually Windows 10 Macro to Find and Replace Does Not Work - But Works Manually Office 2007
Novice
Macro to Find and Replace Does Not Work - But Works Manually
 
Join Date: Mar 2016
Posts: 12
Rod_Bowyer is on a distinguished road
Default Macro to Find and Replace Does Not Work - But Works Manually

I have a spreadsheet into which I import web data. One of the columns is called "Grade". However, some of the data is imported as a short date. When I use the "Find and Replace" facility it finds all the "dates" and replaces them with the appropriate "Grade". However, when I record a Macro while doing this it works while I am recording the Macro but does not work when I run the Macro later.
The recorded Macro is:-
Sub Macro2()
'
' Macro2 Macro
' This section of the macro replaces "dates" in the Grade column and replaces them with Grades.
'
' Keyboard Shortcut: Ctrl+a
'
Application.Goto Reference:="R19C9"
Range(Selection, Selection.End(xlDown)).Select
Selection.Replace What:="04-05-2016", Replacement:="'4/5", LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub


I have copied just this column into a spreadsheet to show what it looks like.
I have only used one "date" so far in this Macro.
Normally this data is in Column I starting at row 19. Why this should work while I am recording it but not while I am running it is a frustrating mystery.
I would very much appreciate any help ... yet again!
Attached Files
File Type: xlsx Example_For_Forum.xlsx (9.5 KB, 13 views)
Reply With Quote
 

Tags
find/replace macro not wk



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Find and Replace Does Not Work - But Works Manually 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
Macro to Find and Replace Does Not Work - But Works Manually 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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft